# thirdweb > Frontend, Backend, and Onchain tools to build complete web3 apps — on every EVM chain. ## Batching transactions Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful. ReactTypeScript ```tsx import { useActiveAccount, useSendBatchTransaction, } from "thirdweb/react"; import { approve, transferFrom } from "thirdweb/extensions/erc20"; const smartAccount = useActiveAccount(); const { mutate: sendBatchTransaction } = useSendBatchTransaction(); const approveAndTransfer = async () => { const transactions = [ approve({ contract, spender: "0x...", value: 100, }), transferFrom({ contract, from: "0x...", to: "0x...", amount: 100, }), ]; await sendBatchTransaction(transactions); }; ``` ## ERC-20 Paymaster In traditional Ethereum transactions, users pay gas fees in the native cryptocurrency of the network, such as ETH. This requirement can create friction, especially for applications where users interact with smart contracts without holding native tokens. ERC-20 Paymaster enables users pay gas fees using ERC-20 tokens. [Learn more about ERC-20 Paymasters.](https://blog.thirdweb.com/account-abstraction-paymaster-pay-evm-gas-fees-with-usdt-usdc-or-any-other-erc-20-token/) #### Get Started Configure the Paymaster In your SDK code, specify the ERC-20 token you wish to use for gas fees. Currently you may use Lisk LSK, Base USDC or Celo CUSD. TypeScriptReact.NETUnity ```tsx import { base, lisk, celo } from "thirdweb/chains"; import { TokenPaymaster, smartWallet } from "thirdweb/wallets"; // Have users pay for gas in Base USDC const usdcWallet = smartWallet({ chain: base, sponsorGas: true, overrides: { tokenPaymaster: TokenPaymaster.BASE_USDC, }, }); // Have users pay for gas in Lisk LSK const lskWallet = smartWallet({ chain: lisk, sponsorGas: true, overrides: { tokenPaymaster: TokenPaymaster.LISK_LSK, }, }); // Have users pay for gas in Celo CUSD const cusdWallet = smartWallet({ chain: celo, sponsorGas: true, overrides: { tokenPaymaster: TokenPaymaster.CELO_CUSD, }, }); ``` ## Account Factories By default, the SDK uses a global account factory deployed on most chains: * [AccountFactory](https://thirdweb.com/thirdweb.eth/AccountFactory) at address [0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00](https://thirdweb.com/1/0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00) for Entrypoint v0.6. * [AccountFactory\_0\_7](https://thirdweb.com/thirdweb.eth/AccountFactory%5F0%5F7) at address [0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb](https://thirdweb.com/1/0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb) for Entrypoint v0.7. The default account factory deploys standard, immutable accounts with the features listed below. However, you can customize the behavior of your apps smart accounts by deploying your own account factory contracts. ### Deploy your own Account Factory contract You can deploy your own Account Factory via the [explore page](https://thirdweb.com/explore/smart-wallet) or build your own [ERC 4337](https://eips.ethereum.org/EIPS/eip-4337) compatible factory contract using the [Solidity SDK](https://portal.thirdweb.com/contracts/build/base-contracts/erc-4337). thirdweb offers different kinds of prebuilt account factories: ##### Account Factories comparison | Factory Type | Upgradeability | Expected Usage | | ------------------------------------------------------------------ | ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Standard](https://thirdweb.com/thirdweb.eth/AccountFactory) | Non-upgradeable | Developer wants to issue simple smart accounts to their users. They do not anticipate that users wallets will need any feature upgrades. | | [Managed](https://thirdweb.com/thirdweb.eth/ManagedAccountFactory) | Account upgrades controlled centrally by the app developer. | Developer wants to issue smart accounts to their users. They do anticipate feature upgrades to user wallets, and want to push upgrades to user wallets for seamless/invisible UX for upgrades. | ##### Account comparison | Simple | Managed | | | --------------------------------------------------- | ---------------------- | ------------------------------------ | | Contracts | AccountFactory Account | ManagedAccountFactory ManagedAccount | | ERC-4337 Compatible | ✅ | ✅ | | Can hold native ERC-20, ERC-721 and ERC-1155 Tokens | ✅ | ✅ | | Multi-signer | ✅ | ✅ | | Execute transactions in Batches | ✅ | ✅ | | Is the Account Upgradeable | ❌ | ✅ | | Who controls upgrades (?) | n/a | Admin of the account factory. | To learn more about each factory and their respective account implementations, read our [smart contract deep dive](https://blog.thirdweb.com/smart-contract-deep-dive-building-smart-wallets-for-individuals-and-teams/). ## Engine Learn to setup gasless transactions using TransactionButton and Engine This guide assumes you have already installed Connect SDK into your application. If you have not, please refer to the [quickstart guide](https://portal.thirdweb.com/connect/quickstart). * #### Relayer URL Obtain the Relayer URL using Engine. For steps on how to obtain the Relayer URL, refer to the [Engine relayer guide](https://portal.thirdweb.com/engine/features/relayers). * #### Add transaction button Add a transaction button for the method you want to sponsor funds for. Pass in the `relayerUrl` and `relayerForwarderAddress` ```jsx function Example() { return ( { // Create a transaction object and return it const tx = prepareContractCall({ contract, method: "mint", params: [address, amount], }); return tx; }} onTransactionSent={(result) => { console.log("Transaction submitted", result.transactionHash); }} onTransactionConfirmed={(receipt) => { console.log("Transaction confirmed", receipt.transactionHash); }} onError={(error) => { console.error("Transaction error", error); }} gasless={{ provider: "engine", relayerUrl: "...", relayerForwarderAddress: "...", }} > Confirm Transaction ); } ``` ## Biconomy Learn to setup gasless transactions using TransactionButton and Biconomy's gasless relayers. This guide assumes you have already installed Connect SDK into your application. If you have not, please refer to the [quickstart guide](https://portal.thirdweb.com/connect/quickstart). * #### API Id & Key Obtain an API Id and Key using Biconomy. For steps on how to obtain the API Id and Key, refer to the [Biconomy documentation](https://docs-gasless.biconomy.io/guides/biconomy-dashboard). * #### Forwarder Address Obtain a Forwarder Address using Biconomy for the specified network. The full list of forwarder addresses can be found on [Biconomy documentation](https://docs-gasless.biconomy.io/misc/contract-addresses) * #### Add transaction button Add a transaction button for the method you want to sponsor funds for. Pass in the `apiId` and `apiKey` obtained earlier from Biconomy's dashboard. ```jsx function Example() { return ( { // Create a transaction object and return it const tx = prepareContractCall({ contract, method: "mint", params: [address, amount], }); return tx; }} onTransactionSent={(result) => { console.log("Transaction submitted", result.transactionHash); }} onTransactionConfirmed={(receipt) => { console.log("Transaction confirmed", receipt.transactionHash); }} onError={(error) => { console.error("Transaction error", error); }} gasless={{ provider: "biconomy", relayerForwarderAddress: "...", apiId: "...", apiKey: "...", }} > Confirm Transaction ); } ``` ## OpenZeppelin Learn to setup gasless transactions using TransactionButton and OpenZeppelin's gasless relayers. This guide assumes you have already installed Connect SDK into your application. If you have not, please refer to the [quickstart guide](https://portal.thirdweb.com/connect/quickstart). * #### Relayer URL Obtain the Relayer URL using OpenZeppelin. For steps on how to obtain the Relayer URL, refer to the [OpenZeppelin documentation](https://docs.openzeppelin.com/defender/v2/manage.html#relayers). * #### Forwarder Address Obtain a Forwarder Address using Biconomy for the specified network. Learn how to obtain a forwarder address from [OpenZeppelin documentation](https://docs.openzeppelin.com/contracts/5.x/api/metatx) * #### Add transaction button Add a transaction button for the method you want to sponsor funds for. Pass in the `relayerUrl` and `relayerForwarderAddress` ```jsx function Example() { return ( { // Create a transaction object and return it const tx = prepareContractCall({ contract, method: "mint", params: [address, amount], }); return tx; }} onTransactionSent={(result) => { console.log("Transaction submitted", result.transactionHash); }} onTransactionConfirmed={(receipt) => { console.log("Transaction confirmed", receipt.transactionHash); }} onError={(error) => { console.error("Transaction error", error); }} gasless={{ provider: "openzeppelin", relayerUrl: "...", relayerForwarderAddress: "...", }} > Confirm Transaction ); } ``` ## Getting Started Getting started to add ERC-4337 compatible smart accounts to your application easily. Once set, your application will: * Let users **connect to their smart account** using any personal wallet, including in-app wallets for easy onboarding. * Automatically **deploy individual account contracts** for your users when they do their first onchain transaction. * **Handle all transaction gas costs** via the thirdweb paymaster. * #### Get a free API key You will require an API key to use thirdweb's infrastructure services such as the bundler and paymaster. Obtain an API key from the [thirdweb dashboard Settings page](https://thirdweb.com/create-api-key). The API key lets you access thirdweb's bundler and paymaster infrastructure, which is required for smart accounts to operate and optionally enable [gasless transactions](https://portal.thirdweb.com/glossary/gasless-transactions). Learn more about creating an API key and restricting which contracts the smart account can interact with [here](https://portal.thirdweb.com/api-keys). * #### Connect smart accounts in your application Use the following code to integrate account abstraction into your apps. #### Sponsored transactions To set up sponsored transactions, set the `sponsorGas` option to `true` in the smart account configuration. All transactions performed with the smart account will then be sponsored by your application. Testnet transactions are free, but you need a valid credit card on file for mainnet transactions. UI ComponentReact HookTypeScriptUnity ```tsx import { createThirdwebClient } from "thirdweb"; import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID", }); export default function App() { return ( ); } ``` * #### Executing Transactions with Smart Accounts Once setup, you can use the Connect [TypeScript](https://portal.thirdweb.com/typescript/v5), [React](https://portal.thirdweb.com/react/v5) and [Unity SDKs](https://portal.thirdweb.com/unity) to deploy contracts, perform transactions, and manipulate smart accounts like any other wallet. UI ComponentReact HookTypeScriptUnity ```tsx import { getContract } from "thirdweb"; import { useActiveAccount, useSendTransaction } from "thirdweb/react"; import { mintTo, balanceOf } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x..." }); // The ThirdwebProvider setup above already handles the connection to the smart account // Within the provider, you can use the SDK normally to interact with the blockchain export default function MyComponent() { // Get the connected smart account const smartAccount = useActiveAccount(); // Example read const { data, isLoading } = useReadContract( balanceOf, { contract, owner: smartAccount.address!, }, { enabled: !!smartAccount, }, ); // Example write const { mutate: sendTransaction, isPending } = useSendTransaction(); const mint = () => { sendTransaction({ transaction: mintTo({ contract, to: smartAccount.address, nft: { name: "My NFT", description: "My NFT description", image: "https://example.com/image.png", }, }), }); }; // Mint a new NFT return ; } ``` #### Demos Learn by example with these open-source demos: Account Abstraction Demos A reference implementation to create and interact with smart accounts. [GitHubView on GitHub](https://github.com/thirdweb-example/account-abstraction) ## What is a Smart Account? A Smart account is a smart contract wallet that follows the [ERC-4337 specification](https://eips.ethereum.org/EIPS/eip-4337). Ethereum has 2 types of accounts to transfer and receive tokens: EOAs (Externally Owned Accounts) and Contract Accounts. A smart account is a wallet managed by a contract account instead of an EOA. A smart account is a wallet type requiring **no private keys or seed phrases**. Smart accounts rely on code instead of private keys to secure and recover wallet information. **A smart account is a type of Web3 wallet powered by smart contracts.** This smart account is unlocked by a 'key' - a personal account. This key can be anything from a [MetaMask wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.metamask) or even an [In-App Wallet](https://portal.thirdweb.com/connect/in-app-wallet/overview) and is used as a way to 'sign in' to the wallet. ### Benefits of Smart Accounts * Optimized transaction efficiency & batch transactions * Combine multiple transactions into a single atomic transaction * Improved Security Features * Social & Multi-Sig Recovery * Recover a wallet without seed phrases/passwords * Nominate a trusted person to recover your wallet in the case of an emergency * Programmability * Smart accounts can be programmed to do anything a smart contract can do * Smart accounts can be upgraded to add new features ### Account Factories In order to issue smart accounts for users, an account factory contract must be used. This factory contract is responsible for deploying individual user contracts when required. The SDK provides a global factory ready to use, but you can also deploy your own factory. ### Terminology #### Personal Wallet/Key This is the default admin on an account or the "key" to an account. It can be any wallet and is used to initialize the account. Only one wallet can only be the "key" to one account per factory contract. This wallet is the primary way to access and interact with the account. #### Account The account is the ERC-4337 compatible smart contract which holds all of the assets. #### UserOperations This is the data structure for the "pseudo-transaction" that the user wants to perform. The transaction is pseudo as Smart Accounts cannot initiate transactions on EVM chains as they are not supported natively. It contains the following fields: * `sender`: The account making the operation. * `nonce`: Anti-replay parameter; also used as the salt for first-time account creation. * `initCode`: The initialization code needed to create the account (needed if and only if the account is not yet onchain). * `callData`: The data to pass to the `sender` during the operation. * `callGasLimit`: The amount of gas to allocate for the operation. * `verificationGasLimit`: The amount of gas to allocate for the verification step. * `preVerificationGas`: The amount of gas to pay to compensate the bundler for pre-verification execution and calldata. * `maxFeePerGas`: Maximum fee per gas (similar to [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) `max_fee_per_gas`). * `maxPriorityFeePerGas`: Maximum priority fee per gas (similar to [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)). * `paymasterAndData`: Address of the paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction). * `signature`: Data passed into the account along with the nonce during the verification step. Should depend on the `chainid` and `EntryPoint` address to prevent replay attacks. #### EntryPoint The EntryPoint is a singleton contract (a contract that has a predictable address that is the same on every chain). It has two methods that are used as entry points to execute bundles of UserOperations: `handleOps` and `handleAggregatedOps`. #### Bundler (relayer) A bundler is a node that monitors the alternative mempool of `UserOperations` and bundles multiple `UserOps` together to forward to the EntryPoint contract as a single transaction. These `UserOps` can be sent from different accounts and are bundled and sent to the `EntryPoint` contract via a `handleOps` call. The bundler is controlled by its own EOA which initially pays for the gas fees upfront and is then repaid by either the sender or a paymaster if the transaction is sponsored. The entry point contract then uses the `validateOp` and `executeOp` functions on the smart account contract to verify and execute the `UserOps` on behalf of the users. It allows you to send transactions with smart accounts. #### Paymaster A paymaster is a smart contract that relays transactions. It provides a service that enables a third party to pay the transaction fee on behalf of the user by funding the Paymaster contract in advance. The paymaster acts as a gas reserve which then can be used during the call execution via the `EntryPoint` contract. The thirdweb [Account abstraction](https://portal.thirdweb.com/connect/account-abstraction) paymaster is initially paid for by thirdweb. By using an API key, the usage is tracked and billed. You can easily define [sponsorship rules](https://portal.thirdweb.com/connect/account-abstraction/sponsorship-rules) that determine whether a transaction will be sponsored. ## Using Account abstraction in Typescript By using the [TypeScript SDK](https://portal.thirdweb.com/typescript/v5), you can use smart accounts in your applications easily. ### Example Use Cases The wallet SDK with the TypeScript SDK is primarily used when creating a backend for your application or when creating a node script. In this guide, we will be using the wallet SDK to create a Node script but the logic for creating a backend is the same. If you are working in a React environment, you are recommended to follow [this guide](https://portal.thirdweb.com/connect/account-abstraction/guides/react). * #### Create an API key To use the bundler and paymaster, you must create an API key and a billing account. To create an API Key: * Head to the settings page in the dashboard and click the **API Keys** tab. * Click on **Create API Key**. * Follow the steps to create your API key. To use account abstraction infrastructure on mainnet you will also need to [create an account and add a payment method](https://thirdweb.com/team/~/~/settings/billing). * #### Create a Node Script To use smart accounts in a node script, simply create a new Node.js project and install the `thirdweb` package. ```bash npm i thirdweb ``` Create a `.env` file and add the following: ```bash THIRDWEB_SECRET_KEY= PRIVATE_KEY= ``` Create an `index.ts` file where we'll write our script. * #### Creating the Personal Wallet Key This smart account is unlocked by a 'key' - a personal wallet. This key can be anything from a MetaMask wallet or an In-App Wallet or just a private key and is used as a way to 'sign in' to the smart account. To create a personal wallet key, we are going to use the [privateKeyAccount](https://portal.thirdweb.com/references/typescript/v5/privateKeyAccount), which we need to import from the `thirdweb/wallets` package. ```typescript import { createThirdwebClient } from "thirdweb"; import { privateKeyAccount } from "thirdweb/wallets"; const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY as string, }); const personalAccount = privateKeyAccount({ client, privateKey: process.env.PRIVATE_KEY as string, }); console.log("Personal account address:", personalAccount.address); ``` * #### Creating the Smart account Now, let's create a smart account using `smartWallet` from `thirdweb/wallets` package. To do this, we need to pass an object of type [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) to the function. Some of the important properties in this object are: * `chain`: the chain that the smart account will be deployed on. * `sponsorGas`: whether the smart account should have sponsored transactions or not. Once we have created the smart wallet interface, we can connect the personal wallet to the smart account using the `connect` method. ```typescript import { smartWallet } from "thirdweb/wallets"; // Configure the smart wallet const wallet = smartWallet({ chain: sepolia, sponsorGas: true, }); // Connect the smart wallet const smartAccount = await wallet.connect({ client, personalAccount, }); ``` * #### Using the Smart Account Now that we have created a smart account object and connected it, we can use it to perform onchain actions gaslessly. In this example, we will claim a NFT using the `claimTo` method and then send the transaction using the `sendTransaction` method. ```typescript const balance = await getWalletBalance({ client, chain, address: smartAccount.address, }); console.log("Smart account balance:", balance.displayValue); const contract = getContract({ client, chain: sepolia, address: "0x...", // deploy a drop contract from thirdweb.com/explore }); const transaction = await claimTo({ contract, to: smartAccount.address, quantity: 1, }); const { transactionHash } = await sendTransaction({ transaction, smartAccount, }); console.log(`Minted NFT with transaction hash: ${transactionHash}`); ``` We have also passed our `secretKey` to the SDK so that we can use the bundler and paymaster. We have also added some helpful logs to view the smart account address and balance using the associated `balance` and `getAddress` methods. * #### Run the Script To run the script, run the following command: ```bash bun index.ts ``` As you can see in the terminal output, upon claiming the token, the smart account is deployed. This is because smart account contracts are deployed when the first transaction is initiated. We have successfully deployed a smart account and claimed an ERC20 token! * #### Conclusion In this guide, we have learned how to use the wallet SDK with the TypeScript SDK to create a smart account and claim an NFT. ## Using Account Abstraction in React By using the [TypeScript SDK](https://portal.thirdweb.com/typescript/v5), you can use smart accounts in your front-end applications easily. * #### Create an API key To use the bundler and paymaster, you must create an API key and a billing account. To create an API Key: * Head to the settings page in the dashboard and click the **API Keys** tab. * Click on **Create API Key**. * Follow the steps to create your API key. To use account abstraction infrastructure on mainnet you will also need to [create an account and add a payment method](https://thirdweb.com/team/~/~/settings/billing). * #### Create an App To use smart accounts in a React app you can either: * Start from a template like our [Next.js](https://github.com/thirdweb-example/next-starter) or [Vite](https://github.com/thirdweb-example/vite-starter) starter. * Add the dependencies to an existing project using `npm i thirdweb` or your favorite package manager. In this guide, we'll use the [Next.js starter template](https://github.com/thirdweb-example/next-starter). Clone the repo and follow the instructions in the README to set up the project. * #### Build your connection UI ##### Using Connect Wallet (prebuilt UI) To use the [Connect Button](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) component to connect your users to your app using smart accounts, we just need to pass the `accountAbstraction` prop. You can change the configuration based on your requirements. ```tsx import { ConnectButton } from "thirdweb/react"; import { sepolia } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "your-client-id" }); function App() { return (
); } ``` Clicking on the connect button will show the following Modal which allows you to connect a personal wallet. This is the personal wallet you are using to initialize the smart account. After connecting your personal wallet, a smart account is created for you and connected to the application. ##### Using the `useConnect` hook (custom UI) The [useConnect](https://portal.thirdweb.com/references/typescript/v5/useConnect) hook allows you to programmatically connect your application to the wallet. You will need to build your own UI for connecting the wallet. ```tsx import { useConnect } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; function Example() { // 1. set the `accountAbstraction` configuration const { connect } = useConnect({ client, accountAbstraction: { chain: sepolia, sponsorGas: true, }, }); const connectToSmartAccount = async () => { // 2. connect with the admin wallet of the smart account connect(async () => { const wallet = inAppWallet(); // or any other wallet await wallet.connect({ client, chain: sepolia, strategy: "google", }); return wallet; }); }; return ( ); } ``` * #### Use the Smart account Now that you have connected your smart account to your app, you can use it to send transactions and interact with smart contracts. Deploy a NFT Drop contract from the [explore page](https://thirdweb.com/explore/nft-drop) or build your own [ERC 721](https://eips.ethereum.org/EIPS/eip-721) compatible contract using the [Solidity SDK](https://portal.thirdweb.com/contracts/build/overview). Use the dashboard to upload some NFTs that we will claim with our smart account. To claim an NFT, we will use the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) component to send the transaction. ```tsx import { getContract } from "thirdweb"; import { useActiveAccount, TransactionButton } from "thirdweb/react"; import { claimTo } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x..." }); // The ThirdwebProvider setup above already handles the connection to the smart account // Within the provider, you can use the SDK normally to interact with the blockchain export default function MyComponent() { // Get the connected smart account const smartAccount = useActiveAccount(); // Fetch owned NFTs const { data, isLoading } = useReadContract( getOwnedNFTs, { contract, address: smartAccount.address!, }, { enabled: !!smartAccount, }, ); // Mint a new NFT return ( { if (!account) return; return claimTo({ contract, to: account.address, quantity: 1, }); }} onTransactionConfirmed={() => { alert("NFT Minted!"); }} > Mint NFT ); } ``` * #### Conclusion In this guide, we learned how to connect users to a React app using two methods: * With the Connect Wallet component. * With a custom UI component via the `useConnect` hook. ## Bundler & Paymaster Infrastructure The thirdweb SDK handles all the heavy lifting of bundling operations and covering gas fees with a turn-key infrastructure. The thirdweb paymaster and bundler services are **stand alone** and can be used with any smart account contract without using the thirdweb SDKs. On testnets, the only requirement is to obtain a free client id to get started. Once you're ready to deploy on mainnets, you will require an active [billing account](https://thirdweb.com/team/~/~/settings/billing). You can configure your client ID to restrict interactions only with your own contracts or with any contract. #### Supported chains With a thirdweb API key, you get access to bundler and paymaster infrastructure on the following chains: [View all supported chains with Account Abstraction](https://thirdweb.com/chainlist?service=account-abstraction). ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsupported-chains.eca8603d.png&w=3840&q=75) To support a chain not listed, [contact us](https://thirdweb.com/contact-us). ### Using Paymaster & Bundler URL To use the Paymaster & Bundler URL for thirdweb, you can follow the guide below: #### URL Pattern The URL pattern is predictable for all chains and is used for both paymaster and bundler operations: ``` ``` Replace `` with the appropriate chain ID and `` with your thirdweb client ID. #### Client ID in Header You can also pass the client ID via the header: ``` ``` #### Frontend Calls For frontend calls, the calling domain needs to be allowlisted. This can be done from the thirdweb dashboard in the API key settings. #### Backend Usage For backend usage, the secret key is required as a header, and the client ID can be omitted: ``` ``` Make sure to replace the placeholders with your actual values. This guide will help you set up and use Paymaster & Bundler URLs effectively with thirdweb. ### Using a Custom Bundler Smart accounts are free to use with your own account abstraction infrastructure. To use your own paymaster & bundler, pass the `bundlerUrl` the `SmartWalletOptions` overrides: ```ts const config: SmartWalletOptions = { chain, sponsorGas: true, overrides: { bundlerUrl: "your-bundler-url", }, }; ``` ### Using a Custom Paymaster You can also provide an entirely custom paymaster logic by providing a `paymaster` function to the `SmartWalletOptions` overrides. ```ts const config: SmartWalletOptions = { chain, sponsorGas: true, overrides: { paymaster: async (userOp: UserOperation) => { // your custom paymaster logic return myPaymasterResultLogic(userOp); }, }, }; ``` ### Pricing & Billing To use thirdweb's account abstraction infrastructure, you need to set up a billing account on the thirdweb dashboard Settings page. **Pricing**: * **Bundler**: Transaction bundle calls (non-sponsored calls) are free to use. * **Paymaster**: 10% premium on top of network fee based on your usage. Find more information on the different billing tiers by visiting [thirdweb's pricing page](https://thirdweb.com/pricing). ## Account Abstraction Everything you need to leverage account abstraction technology to enable seamless user experiences for your users. You get all the tools to integrate account abstraction into your app. This includes: * Account factory contracts that let you spin up smart accounts for your users * Bundler, which is the infrastructure needed to process account abstraction transactions (known as User Ops) * Paymaster, which lets you sponsor transaction fees for your users ### Features ![](/icons/feature-cards/transactions.svg) ##### Execute Transactions Enable exchange of native currencies and NFTs to smart account ![](/icons/feature-cards/account-factory.svg) ##### Account Factory Contracts Deploy ERC-4337 through dashboard, CLI, and SDKs ![](/icons/feature-cards/gasless.svg) ##### Sponsor Transaction Fees Sponsor transaction fees for users using Paymaster services ![](/icons/feature-cards/session-keys.svg) ##### Provision Access Provide provisioned access with restrictions using session keys ![](/icons/feature-cards/bundler.svg) ##### Bundler Equipped with transaction processing software ![](/icons/feature-cards/permissions.svg) ##### Enable permissions Assign signer and admin roles for granular access ![](/icons/feature-cards/composable-api.svg) ##### Composable API Compatible with external bundler and paymaster services or non-thirdweb ERC-4337 contracts ![](/icons/feature-cards/upgrade.svg) ##### Upgradeable Managed version of factory contracts to enable future upgrades ### Demos Learn by example with these open-source demos: Account Abstraction Demos A reference implementation to create and interact with smart accounts. [GitHubView on GitHub](https://github.com/thirdweb-example/account-abstraction) ### References By using the thirdweb SDKs, you can easily create and manage smart accounts for your users: [TypeScriptTypeScript](https://portal.thirdweb.com/typescript/v5)[UnityUnity](https://portal.thirdweb.com/unity) ## Account Permissions & Session Keys All of the account contracts - [Simple](https://thirdweb.com/thirdweb.eth/AccountFactory) and [Managed](https://thirdweb.com/thirdweb.eth/ManagedAccountFactory) \- share the same permission model. In this section, we'll describe this permission model in detail. An account recognizes only two types of actors: _Session Keys_ and _Admins_. ### 1\. Admins Admins have **unrestricted access** to the account; call any functions on the contract, use the contract without going through the ERC-4337 infrastructure (bundlers, EntryPoint, etc.), withdraw the account's native token balance, and so on. #### Assigning Admin Permissions Existing admins on the account can add new admins, remove existing admins or renounce their own admin status. ReactTypeScript ```tsx import { addAdmin } from "thirdweb/extensions/erc4337"; import { useSendTransaction, useActiveAccount } from "thirdweb/react"; import { getContract } from "thirdweb"; const { mutate: sendTransaction } = useSendTransaction(); const smartAccount = useActiveAccount(); const onClick = () => { if (!smartAccount) return; const transaction = addAdmin({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, adminAddress: "0x...", // the address of the new admin }); sendTransaction(transaction); }; ``` ### 2\. Session Keys Session Keys are additional authorized signers that must go through ERC-4337 infrastructure (bundlers, EntryPoint, etc.) to use an account to execute transactions. Session keys can use an account under certain restrictions. #### Assigning Session Key Permissions Each individual session key has its own permissions to use the account. Only admins can set the permissions for session keys. Session keys can be assigned the following permissions: * \[Required\] Allow interaction with specific contracts with the account ("\*" for any contracts) * \[Optional\] Have a maximum amount of native tokens that can be transferred per transaction (defaults to 0 eth, transactions with value will be rejected) * \[Optional\] Have access to the account only during a specific time window (defaults to 10 years from now) These restrictions are set in the `SignerPermissionsRequest` struct. To set the permissions for a given signer, the `setPermissionsForSigner` function is called. ReactTypeScriptUnity ```tsx import { addSessionKey } from "thirdweb/extensions/erc4337"; import { useSendTransaction, useActiveAccount } from "thirdweb/react"; import { getContract } from "thirdweb"; const { mutate: sendTransaction } = useSendTransaction(); const smartAccount = useActiveAccount(); const onClick = () => { if (!smartAccount) return; const transaction = addSessionKey({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, sessionKeyAddress: "0x...", // the address of the account allowed to use the session key permissions: { approvedTargets: "*", // the addresses of allowed contracts, or '*' for any contract nativeTokenLimitPerTransaction: 0.1, // the maximum amount of native token (in ETH) that the session key can spend per transaction permissionStartTimestamp: new Date(), // the date when the session key becomes active permissionEndTimestamp: new Date( Date.now() + 24 * 60 * 60 * 1000, ), // the date when the session key expires }, }); sendTransaction(transaction); }; ``` ## Sponsorship rules You can easily define rules around which transactions (User Ops) the paymaster should sponsor. This can be used to prevent abuse, progressively onboard users, and incentivize specific in-app actions. You can set the following sponsorship rules * **Global spend limits**: Maximum gas cost (in USD) that you want to sponsor. This applies for the duration of the billing period (monthly). * **Server verifier**: This is a general-purpose check that can be used to define custom rules. Before a transaction is sent, it checks with an endpoint that you specify whether it should be sponsored or not. * **Contract address restrictions**: Use this if you want to sponsor transactions sent only to a specific set of contracts. Transactions sent to contracts outside this allowlist will remain unsponsored. * **Chain restrictions**: Use this if you want to sponsor transactions only on certain chains. If this is not set, transactions on all [supported chains](https://portal.thirdweb.com/wallets/account-abstraction/infrastructure#supported-chains) will be sponsored. * **User lists**: You can use this define allowlists or blocklists. Allowlists let you restrict sponsored transactions to transactions sent by a specific set of known accounts. Blocklists let you block bad actors from abusing your paymaster. * **Admin accounts**: These accounts are not subject to any sponsorship rule, all their transactions will be sponsored. Use this only with accounts that you control (eg. for testing purposes). We highly recommend that you set sponsorship rules before your app goes live to prevent malicious actors from abusing your paymaster, which could lead to unexpectedly large bills. #### Setting Sponsorship rules You can easily set sponsorship rules by going to your Team > Project > Connect > Account Abstraction > Sponsorship Policies page. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsponsorship-rules.910a5e9b.png&w=3840&q=75) #### Setting up a server verifier You can set up a server verifier by providing a URL that the paymaster will call before sponsoring a transaction. This allows for fine grained control over which transactions are sponsored. The thirdweb infrastructure will send a POST request to the URL you specify with the following JSON payload: ```ts // thirdweb will call your server with the following JSON body as a POST request { clientId: string; // the clientId that is making the request chainId: number; // the chainId of the transaction userOp: { sender: string; // the address of the sender targets: string[]; // the addresses of the target contracts or wallets gasLimit: string; // the gas limit of the transaction gasPrice: string; // the gas price of the transaction in wei data: { targets: string[], // the targets contracts or wallets called in this operation callDatas: string[], // the call data of each transaction values: string[], // the values (in wei) of each transaction } }; } ``` Your server should respond with a 200 and the following JSON payload: ```ts // You should respond with the following JSON payload { isAllowed: boolean; // whether the transaction should be sponsored or not reason: string?; // optional reason for why the transaction is not allowed } ``` Note: for performance reasons, your server should respond within 5 seconds. If it takes longer, the transaction will be unsponsored. #### FAQs **What happens if a limit is hit? Does the transaction fail or does it go unsponsored?** If a limit is hit the transaction will go unsponsored. If you are spinning up fresh accounts for users in your app, it is unlikely that the user accounts will hold any funds. You can catch the following out of funds error to gracefully handle this within your app `AA21 didn't pay prefund`. **What networks are sponsorship rules available in?** Sponsorship rules apply across all the [networks that we support account abstraction in](https://portal.thirdweb.com/connect/account-abstraction/infrastructure#supported-chains). You don't need to specify different rules for each network or each account factory as long as they use the same client ID. However, you can restrict sponsored transactions to specific networks if you choose to. **Will sponsorship rules work with third-party paymasters?** No, sponsorship rules will apply if you are using thirdweb's paymaster. #### Pricing Setting a server verifier requires your account to be on the growth plan. The other policies are free to use. There is no usage based pricing for policies. ## Deploying Your App to Production Before you deploy your app to real users, you'll want to make sure your application is secure and ready to onboard users to your app. This involves separating some operations to the server and others to the client. The examples in [Getting Started](https://portal.thirdweb.com/connect/auth) do everything on the client. The following examples demonstrate what should be on the server instead to ensure your application is secure. Some of the code here is left for you to implement. This provides you with flexibility and control over your application's authentication. However, if you'd like specific examples, check out our[templates](https://portal.thirdweb.com/connect/auth#templates) or [framework guides](https://portal.thirdweb.com/connect/auth#frameworks). ClientServer At the root of your application: ```tsx import { ThirdwebProvider } from "thirdweb/react"; export default function App() { return {/* Your app here */}; } ``` In your `components` directory: ```tsx import { ConnectButton } from "thirdweb/react"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId }); export default function Connect() { { const address = params.address; // fetch the login payload here using address }, doLogin: async (params) => { // send the signed login payload (params) to the server }, isLoggedIn: async () => { // fetch the user's login status from the server }, doLogout: async () => { // send a logout request to the server }, }} />; } ``` ## FAQs #### Can users have the same smart account contract address on all EVM chains? Yes, by using our Account factory contracts, it is possible to enable predictable addresses per user across all EVM chains. To do this, ensure that your **account factory** has the same address on every chain. You can accomplish this from the dashboard by enabling "Deterministic address" when deploying the account factory. #### Can I sign transactions with my smart account? Smart contract wallets cannot sign transactions themselves, only the 'owners' of the smart account can. The way to achieve this is to follow [EIP-1271](https://eips.ethereum.org/EIPS/eip-1271) which requires to ask the smart contract wallet if the recovered address is indeed an owner. #### Can I use In-App Wallets with account abstraction? Yes! In-App Wallets with account abstraction is a powerful combination that allows users to sign in using their email, social media accounts, or custom JWT method (In-App Wallet), and provides a completely gasless user experience. #### Are smart accounts custodial or non-custodial? Smart accounts are non-custodial. It uses smart contracts to operate and manage assets via an admin wallet that signs on behalf of the smart account #### Is setting a trusted forwarder necessary for account abstraction? No, There is no need to use a trusted forwarder when implementing account abstraction for your contract. ## Blockchain API Perfomant, reliable and type safe API to read write to any contract on any EVM chain through our [RPC Edge](https://portal.thirdweb.com/infrastructure/rpc-edge/overview) endpoints. ## Overview Auth allows anyone to integrate passwordless web3-native authentication and authorization into their applications. Users can then **login using any thirdweb wallet** (in-app, browser, or smart wallet). This allows developers to create a familiar, secure authentication flow that works with traditional backends while leveraging the features of a web3 application. --- ## Get Started npmyarnpnpmbun `npm i thirdweb ` ### Get Your Client ID To use Auth in your app, you'll need a client ID. You can get one for free on [your thirdweb dashboard](https://thirdweb.com/create-api-key). ### Setting Up Auth ReactTypeScript ```tsx import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; import { createThirdwebClient } from "thirdweb"; import { createAuth } from "thirdweb/auth"; const client = createThirdwebClient({ clientId: "1234567890", // get yours by creating a project on https://thirdweb.com/create-api-key }); const thirdwebAuth = createAuth({ domain: "localhost:3000", client, adminAccount: privateKeyToAccount({ client, privateKey }), }); export default function App() { const [loggedIn, setLoggedIn] = useState(false); return ( // The ThirdwebProvider should be at the root of your application, but the ConnectButton can be anywhere { // here you should call your backend, using generatePayload to return // a SIWE compliant login payload to the client return thirdwebAuth.generatePayload(params); }, doLogin: async (params) => { // here you should call your backend to verify the signed payload passed in params // this will verify that the signature matches the intended wallet const verifiedPayload = await thirdwebAuth.verifyPayload(params); setLoggedIn(verifiedPayload.valid); }, isLoggedIn: async () => { // here you should ask you backend if the user is logged in // can use cookies, storage, or your method of choice return loggedIn; }, doLogout: async () => { // here you should call your backend to logout the user if needed // and delete any local auth tokens setLoggedIn(false); }, }} /> ); } ``` #### Deploying to Production These examples are intended to get up and running quickly, but aren't secure for production. Before deploying your app to real users, checkout out our walkthrough on [Deploying to Production](https://portal.thirdweb.com/connect/auth/deploying-to-production). #### Auth with Smart Accounts (Account Abstraction) When using Auth with a smart account, you **must** specify a client (on `createAuth`) and a chain ID (on `generatePayload`). The smart account is deployed on a specific chain and the payload must reflect that, and the client is needed to call the wallet contract to verify the signature. ### Templates Quickly get started with one of our templates: Auth + Next.js A working example of Auth + Next.js [GitHubView on GitHub](https://github.com/thirdweb-example/thirdweb-auth-next) Auth + Express A working example of a React + Express app using Auth [GitHubView on GitHub](https://github.com/thirdweb-example/thirdweb-auth-express) ### Frameworks Auth integrates with a variety of server-side and client-side development frameworks. We're always adding support for more frameworks, so if you don't see yours, [let us know](https://thirdweb.com/contact-us). ## React + Express If you want to interact with a working version of the Auth + React integration that we'll be building in this guide, you can check the following GitHub repository, or clone it with the command below: ``` ``` thirdweb-auth-express React + Express Auth example repository. [GitHubView on GitHub](https://github.com/thirdweb-example/thirdweb-auth-express) ### Installation & Setup npmyarnpnpmbun `npm i thirdweb ` Create a directory to hold your client and server: ```bash $ mkdir my-app $ cd my-app ``` ### Client-side Setup #### Setup Your App Create a new React app with Vite: ```bash $ npm create vite@latest client -- --template react-ts $ cd client ``` Setup your _React app_ `.env` file with the following: ```bash # Get your client id from the thirdweb dashboard: https://thirdweb.com/create-api-key THIRDWEB_CLIENT_ID= # The url of your backend (Express) server for the frontend to interact with AUTH_API= ``` Wrap the root of your application with a thirdweb provider: ```tsx // main.tsx ReactDOM.createRoot(document.getElementById("root")!).render( // Your application layout... , ); ``` #### Creating a Client Create and export a thirdweb client somewhere in your application to be used in your components. This client gives you access to thirdweb's RPCs to read and right from the blockchain. ```tsx // lib/client.ts import { createThirdwebClient } from "thirdweb"; const clientId = process.env.THIRDWEB_CLIENT_ID!; export const client = createThirdwebClient({ clientId }); ``` Don't have a secret key? Get one [here](https://thirdweb.com/create-api-key). #### Adding the Connect Button Create your `` component. **This is where your users will sign in.** ```tsx // components/ConnectButtonAuth.tsx import { ConnectButton } from "thirdweb/react"; import { client } from "../lib/client"; import { LoginPayload, VerifyLoginPayloadParams, } from "thirdweb/auth"; import { get, post } from "../lib/api"; import { sepolia } from "thirdweb/chains"; export default function ConnectButtonAuth() { return ( => { return get({ url: process.env.AUTH_API + "/login", params: { address: params.address, chainId: sepolia.id.toString(), }, }); }, /** * `doLogin` performs any logic necessary to log the user in using the signed payload. * In this case, this means sending the payload to the server for it to set a JWT cookie for the user. */ doLogin: async (params: VerifyLoginPayloadParams) => { await post({ url: process.env.AUTH_API + "/login", params, }); }, /** * `isLoggedIn` returns true or false to signal if the user is logged in. * Here, this is done by calling the server to check if the user has a valid JWT cookie set. */ isLoggedIn: async () => { return await get({ url: process.env.AUTH_API + "/isLoggedIn", }); }, /** * `doLogout` performs any logic necessary to log the user out. * In this case, this means sending a request to the server to clear the JWT cookie. */ doLogout: async () => { await post({ url: process.env.AUTH_API + "/logout", }); }, }} /> ); } ``` #### Adding Account Abstraction To provide your users with a smart wallet so your app can sponsor gas and batch transactions, add the following to your ``: ```tsx Project > Connect > Account Abstraction page gasless: true, // Sponsor gas for your users }} />; ``` ### Server-side Setup #### Setup Your Express API Create a new directory for your backend server: ```bash $ mkdir server $ cd server ``` Initialize a new node project: ```bash $ npm init ``` Accept the defaults for now. Once your project is initialized, install the dependencies: ```bash $ npm install express cors cookie-parser thirdweb ``` Create a `.env` file with the following: ```bash # Get your client id from the thirdweb dashboard: https://thirdweb.com/create-api-key THIRDWEB_SECRET_KEY= # The domain of your frontend -- include the port when running local but nothing else (remember to update this in production) CLIENT_DOMAIN=localhost:5173 # An wallet private key to generate the JWT with AUTH_PRIVATE_KEY= NODE_ENV=development # Set this to production when you deploy! ``` To keep things simple, we've put all server-side routes in the same file. For a production-grade application you'll likely break them out depending on what works for your use case. Either way, the core logic is the same as you see here. #### Create a Server-Side Client Create a server-side client using your secret key: ```ts // thirdwebClient.js import { createThirdwebClient } from "thirdweb"; const secretKey = process.env.THIRDWEB_SECRET_KEY!; export const thirdwebClient = createThirdwebClient({ secretKey }); ``` #### Setup your Express Server We'll assume you've already setup a basic Express API, but there are a few things you'll need to make sure you've done for authentication to work properly between your frontend and backend. ```js import cors from "cors"; import express from "express"; import cookieParser from "cookie-parser"; import { createAuth, type VerifyLoginPayloadParams, } from "thirdweb/auth"; import { privateKeyToAccount } from "thirdweb/wallets"; import { thirdwebClient } from "./thirdwebClient"; const app = express(); app.use(express.json()); app.use(cookieParser()); app.use( // This is important for the cookie to be saved properly!!! cors({ origin: `${process.env.NODE_ENV === "development" ? "http" : "https"}://${process.env.CLIENT_DOMAIN}`, credentials: true, }), ); // ...we'll add routes here next app.listen(3000, () => { console.log(`⚡ Auth server listening on port 3000...`); }); ``` Create your thirdweb auth instance ```js const thirdwebAuth = createAuth({ domain: process.env.CLIENT_DOMAIN!, client: thirdwebClient, adminAccount: privateKeyToAccount({ client: thirdwebClient, privateKey: process.env.ADMIN_PRIVATE_KEY!, }), }); ``` Setup a `GET` route at `/login` to fetch the login payload: ```js app.get("/login", async (req, res) => { const address = req.query.address; const chainId = req.query.chainId; if (!address) { return res.status(400).send("Address is required"); } return res.send( await thirdwebAuth.generatePayload({ address, chainId: chainId ? parseInt(chainId) : undefined, }), ); }); ``` Here, we get the user's address and chain ID to generate the payload with using thirdweb Auth. This payload will be returned to the client for the user to sign with their wallet. It will then be sent back to the server for verification. Create a `POST` route also at `/login` for the frontend to submit the signed payload: ```js app.post("/login", async (req, res) => { const payload: VerifyLoginPayloadParams = req.body; const verifiedPayload = await thirdwebAuth.verifyPayload(payload); if (verifiedPayload.valid) { const jwt = await thirdwebAuth.generateJWT({ payload: verifiedPayload.payload, }); res.cookie("jwt", jwt); return res.status(200).send({ token: jwt }); } res.status(400).send("Failed to login"); }); ``` We receive the signed payload, verify it via thirdweb Auth, then create a JWT if the signed payload is valid. This JWT is assigned to this domain and allows the client to identify itself to the server as authenticated for future requests (until the token expires). Now, we create a route to check if the user is currently logged in: ```js app.get("/isLoggedIn", async (req, res) => { const jwt = req.cookies?.jwt; if (!jwt) { return res.send(false); } const authResult = await thirdwebAuth.verifyJWT({ jwt }); if (!authResult.valid) { return res.send(false); } return res.send(true); }); ``` If the user doesn't have a token, they're definitely not logged in, so we immediately return false. If they do, we verify it to make sure its both accurate and not yet expired. If both are true, we return true. Finally, we need a route to log the user out by clearing their token: ```js app.post("/logout", (req, res) => { res.clearCookie("jwt"); return res.send(true); }); ``` For any routes you add to your server, you can authenticate the user just like we did in `/isLoggedIn`: ```js app.get("/secure", async (req, res) => { const jwt = req.cookies?.jwt; if (!jwt) { return res.status(401).send("Unauthorized"); } const authResult = await thirdwebAuth.verifyJWT({ jwt }); if (!authResult.valid) { return res.status(401).send("Unauthorized"); } // ...your route logic }); ``` Remember your `app.listen` (when you start the server) must come **after** your routes. That's it! You have a React + Express app fully configured with SIWE. When running your app, be sure to start both the client and the server. ### Support For help or feedback, please [visit our support site](https://thirdweb.com/support) ## Create a Custom JWT Auth Server Learn how to integrate your auth backend with our in-app wallets solution so you can onboard your users into web3 seamlessly. This guide will show you how to create your own Auth Server that is compatible with the JWT auth strategy. By doing so, you can have full control over user authentication and data security. This allows you to ensure that your application meets specific compliance requirements while also providing a customized sign-in experience. #### Caution This guide is simplified for demonstration purposes and is not ready for production use. When modifying it for production, secure your endpoints and avoid hard-coding secrets or sensitive information. We recommend using environment variables and secret managers. * #### Setup * Create a new directory for your project and navigate to it in your CLI ```bash mkdir jwt-auth-server cd jwt-auth-server ``` * Initialize a new Node.js application ```bash npm init -y yarn init -y ``` * Install the necessary packages ```bash npm install express jsonwebtoken ``` * #### Generate RSA Key Pair * To generate a private and a public key run ```bash ssh-keygen -t rsa -b 2048 -m PEM -f keys/rsa.key ``` * To create the output file run ```bash openssl rsa -in keys/rsa.key -pubout -outform PEM -out keys/rsa.key.pub ``` * #### Convert Public Key to JSON Web Key Set (JWKS) * Display the public key: ```bash cat keys/rsa.key.pub ``` * Copy the displayed public key. * Convert your public key to a JWK using an online JWK Creator tool. We recommend using [JWK Creator by Russel Davies](https://github.com/russelldavies/jwk-creator). * Paste the public key, set Key ID as `0` (arbitrary string, must match when signing JWT), and then note down the generated JWK. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fjwk-creator-tool.22744d13.png&w=2048&q=75) * Create a `jwks.json` in the project root and place the generated JWK in a `keys` array. ```bash { "keys": [ { ... JWK ... } ] } ``` * #### Create the Server * In the `jw-auth-server` directory, create a file at the root named `server.js` and paste the following: ```jsx const express = require("express"); const fs = require("fs"); const jwt = require("jsonwebtoken"); const app = express(); const PORT = process.env.PORT || 3000; const PRIVATE_KEY = fs.readFileSync("./keys/rsa.key", "utf8"); const jwks = require("./jwks.json"); const users = [ { id: 1, email: "user@example.com", password: "password123" }, ]; app.use(express.json()); app.post("/login", (req, res) => { const { email, password } = req.body; const user = users.find( (u) => u.email === email && u.password === password, ); if (!user) return res.status(401).send({ message: "Invalid credentials" }); const payload = { iss: "http://your-domain.com", sub: user.id.toString(), aud: "EpicGame", email: user.email, exp: Math.floor(Date.now() / 1000) + 3600, }; const token = jwt.sign(payload, PRIVATE_KEY, { algorithm: "RS256", keyid: "0", }); res.send({ token }); }); app.get("/.well-known/jwks.json", (req, res) => { res.json(jwks); }); app.listen(PORT, () => { console.log(`Server started on port ${PORT}`); }); ``` * Replace `http://your-domain.com` with the actual domain for the application. * #### Test Locally * Start the server: ```bash node server.js ``` * Test login: ```bash curl -X POST http://localhost:3000/login -H "Content-Type: application/json" -d '{"email": "user@example.com", "password": "password123"}' ``` * Test JWKS: ```bash curl http://localhost:3000/.well-known/jwks.json ``` * #### Deploy To deploy the server, you can use services such as [Zeet](https://zeet.co/) or [Docker](https://www.docker.com/). Once deployed, replace `http://localhost:3000` in the JWT payload with your actual domain * #### Integrate In-App Wallets * Navigate to Team > Project > Connect > In-App Wallets in [thirdweb dashboard](https://thirdweb.com/team) * Create a new API key by creating a Project if you don't have one or select an existing one to use for this project. [Learn more about API keys.](https://portal.thirdweb.com/api-keys) ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-create-key.651a21bf.png&w=3840&q=75) * Allowlist domain or bundle IDs in Access Restrictions. * Navigate to the Configuration view and enable **Custom JSON Web Token** ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-configuration.31825500.png&w=3840&q=75) * Set the JWKS URI to `your-domain/.well-known/jwks.json` * Set the AUD to `EpicGame` or the value you set as the `aud` in the `server.js` file. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-configuration-opt.d07c1d61.png&w=3840&q=75) * Copy the client ID. * In your preferred thirdweb client SDK, pass the JWT you retrieved from logging in to the server. A persistent, cross-platform wallet is now created for your user. ## Overview In-App wallets already support most popular login methods out of the box, but we also give app developers the flexibility to use in-app wallets with any authentication method. If you have a valid authenticated user, you should be able to easily spin up an in-app wallet for them irrespective of how they got authenticated. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fspeedracer.1031d6ed.png&w=3840&q=75) This means that app developers can now * **Spin up in-app wallets for users using an existing authentication service**. For example, if you have a game where players log in using their username and password, you can now easily create wallets when they sign up. * **Integrate with any social login provider**. For example, if you have a game where you want to let users login with their Steam or Epic games credentials, you can now use in-app wallets to enable these experiences. * **Use in-app wallets in non-frontend environments**. For example, you could authenticate users with SSH and use in-app wallets with CLI tools. * **Build completely custom authentication experiences**. For example, you could ask users to verify their credentials with 2FA or passkey before you consider them authenticated and provision wallets for them. ## Custom Auth Server Learn how to integrate your auth backend with our in-app wallets solution so you can onboard your users into web3 seamlessly. This guide will show you how to create your own Auth Server that is compatible with the `auth_endpoint` strategy. By doing so, you can have full control over user authentication and data security. This allows you to ensure that your application meets specific compliance requirements while also providing a customized sign-in experience. #### Security This guide is simplified for demonstration purposes and is not ready for production use. When modifying it for production, secure your endpoints and avoid hard-coding secrets or sensitive information. We recommend using environment variables and secret managers. ### 5 minute quickstart * #### Step 1 Navigate to Your Team > Project > Connect > In-App Wallets Page from the (dashboard)\[\] * #### Step 2 Create a thirdweb API key if you don't have one or select an existing key to use for this project. [Learn more about API keys.](https://portal.thirdweb.com/api-keys) ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-create-key.651a21bf.png&w=3840&q=75) * #### Step 3 Allowlist domain or bundle IDs in Access Restrictions. * #### Step 4 Navigate to the Configuration view and enable **Custom Auth Endpoint** ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-custom-auth-config.657c2ff0.png&w=3840&q=75) * #### Step 5 Set the Auth Endpoint URL to`https://embedded-wallet.thirdweb.com/api/2023-11-30/embedded-wallet/auth/test-custom-auth-endpoint`for testing purposes. You will replace this later with your own auth server endpoint to verify the `payload`. * #### Step 6 Save the configuration. * #### Step 7 Copy the client ID. * #### Step 8 In your preferred thirdweb client SDK, pass the payload you retrieved from logging in to the server. You can now auth into the wallet and use it to sign transactions like so (see [use your own auth for more](https://portal.thirdweb.com/in-app-wallet/custom-auth)): React & React NativeOther Frameworks ```typescript import { inAppWallet } from "thirdweb/wallets"; import { useConnect } from "thirdweb/react"; const { connect } = useConnect(); const handlePostLogin = async (jwt: string) => { await connect(() => { const wallet = inAppWallet(); wallet.connect({ client, strategy: "auth_endpoint", payload: JSON.stringify({ userId: "ANY_RANDOM_ID_HERE" }), }); return wallet; }); }; ``` A persistent, cross-platform wallet is now created for your user! Of course, you would use your own auth server instead of the one we provided. The rest of this guide will show you how to create your own auth server. #### Setup The following steps will show you how to create a simple auth server that can be used with the embedded wallet. At a high level, the auth server will: * Handle login for the user into your application. * Have a way to get a public identifier for the user. * Have an endpoint to verify the public identifier and return some basic information about the user Steps 1 and 2 are up to you to implement. You can use any auth strategy you want. The endpoint in step 3 is what you register as your auth endpoint on the thirdweb dashboard. Here's a high-level diagram: ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-custom-auth-flow.53700bb1.png&w=3840&q=75) * #### Step 1 Create a new directory for your project and navigate to it in your CLI ```bash mkdir custom-auth-server cd custom-auth-server ``` * #### Step 2 Initialize a new Node.js application ```bash npm init -y ``` OR ```bash yarn init -y ``` #### **Create the Server:** In the `custom-auth-server` directory, create a file at the root named `server.js` and paste the following: ```jsx const express = require("express"); const fs = require("fs"); const app = express(); const PORT = process.env.PORT || 3000; const users = [ { id: 1, email: "user@example.com", password: "password123" }, ]; app.use(express.json()); // This is what your app calls to log in a user and get a public identifier for the user (otherwise known as the payload) app.post("/login", (req, res) => { const { email, password } = req.body; const user = users.find( (u) => u.email === email && u.password === password, ); if (!user) return res.status(401).send({ message: "Invalid credentials" }); res.send({ payload: user.id }); }); // This is a sample endpoint that you would register on the thirdweb dashboard for us to verify the payload app.post("/thirdweb-will-call-this", (req, res) => { const { payload } = req.body; if (!payload) return res.status(401).send({ message: "Invalid credentials" }); // You would write your own logic here to verify the payload here const user = users.find((u) => u.id === payload); if (!user) return res.status(401).send({ message: "Invalid credentials" }); // Once the user is successfully verified, you can return the following field return res.send({ userId: user.id, // The last two fields here are optional email: user.email, exp: Math.floor(Date.now() / 1000) + 60 * 60 * 24 * 30, }); }); app.listen(PORT, () => { console.log(`Server started on port ${PORT}`); }); ``` #### **Test Locally** * Start the server: ```bash node server.js ``` * Test login: ```bash curl -X POST http://localhost:3000/login -H "Content-Type: application/json" -d '{"email": "user@example.com", "password": "password123"}' ``` #### **Deploy** To deploy the server, you can use services such as [Zeet](https://zeet.co/) or [Docker](https://www.docker.com/). #### **Integrate In-App Wallets** Refer top the [quickstart above](#5-minute-quickstart) to integrate the embedded wallet into your application. ## Integrate Firebase Auth Learn how to obtain a JSON Web Token (JWT) from Firebase using Firebase's email provider and integrate it with In-App Wallet. #### Info This article covers the steps of integrating Firebase Auth for a React Native app. Firebase steps and the In-App Wallet code may be replicated for React. ### Prerequisites * Firebase project * React App * #### Create a React Native App Create a react native app with the tool of your choice and install the required packages: ```bash npm i thirdweb ``` * Note that we assume this is a simple app with a single screen `App.tsx`. * #### Set up your Firebase project * Set up a React Native Firebase project by following the [prerequisites in the React Native Firebase documentation](https://rnfirebase.io/#1-install-via-npm). 2\. Navigate to the[Firebase Console](https://console.firebase.google.com/) and create a new project. 3\. Navigate to Authentication > Sign-in method, to enable the[Email/Password provider](https://rnfirebase.io/auth/usage#emailpassword-sign-in) * #### Set up the custom JSON Web Keys link through dashboard * Navigate to your Team > Project > Connect > In-App Wallets in [thirdweb dashboard](https://thirdweb.com/team) * To use in-app wallets, choose an existing Project or create a new one. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Few-create-key.651a21bf.png&w=3840&q=75) * In the configuration view, enable **Custom JSON Web Token.** ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fconfiguration-view.ac6aa7c2.png&w=3840&q=75) * Set the [JWKS URI from here](https://www.googleapis.com/service%5Faccounts/v1/jwk/securetoken@system.gserviceaccount.com) * Set the AUD Value as the Firebase `projectId`. (Example, `custom-auth-53169`) ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fcustom-json-firebase.61b14529.png&w=3840&q=75) * Select **Save changes**. * #### Add the Firebase auth dependencies Firebase auth depends on the `firebase/app` and `firebase/auth` packages. To add the packages, run the following command in the project: ```bash yarn add @react-native-firebase/app @react-native-firebase/auth ``` * #### Implement Email Authentication Add the code snippet below to handle email authentication with Firebase. Note that you need to add UI to allow users to input the email and password fields in your `App.tsx` file: To handle email authentication with Firebase ```jsx import auth from "@react-native-firebase/auth"; async function signInWithEmail(email, password) { try { await auth().createUserWithEmailAndPassword(email, password); } catch (error) { console.error(error); } } return ( } ); } function Example() { return ( ); } ``` _Replace ``_. ### Backend: Call Engine to mint an NFT `POST /api/claim` calls Engine to mint an NFT to the user's wallet. ```tsx export async function POST(request: Request) { const { userWalletAddress } = await request.json(); await fetch( "/contract///erc1155/mint-to", { method: "POST", headers: { "Content-Type": "application/json", Authorization: "Bearer ", "x-backend-wallet-address": "", }, body: JSON.stringify({ receiver: userWalletAddress, metadataWithSupply: { metadata: { name: "Acme Inc. Superfan", description: "Created with thirdweb Engine", image: "ipfs://QmciR3WLJsf2BgzTSjbG5zCxsrEQ8PqsHK7JWGWsDSNo46/nft.png", }, supply: "1", }, }), }, ); return NextResponse.json({ message: "Success!" }); } ``` ### Try it out! Here’s what the user flow looks like. The app prompts the user to connect their wallet. ![Initial page load](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fairdrop-nfts-1.8be1261a.png&w=3840&q=75) ![The app prompts the user to connect their wallet](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fairdrop-nfts-2.e66bac14.png&w=3840&q=75) A user presses claim. ![A user presses claim](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fairdrop-nfts-3.ad5111e9.png&w=3840&q=75) They'll receive the NFT in their wallet shortly! ![They'll receive the NFT in their wallet shortly](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fairdrop-nfts-4.20a552ec.png&w=3840&q=75) ### Full code example The code above is simplified for readability. [View the full source code →](https://github.com/thirdweb-example/engine-minting-api) ## Production Checklist Follow best practices when using Engine in a production environment. #### Security * The Engine API is intended to be called from your backend only. Ensure your access tokens are not accessible from your frontend. * Exception: Relayer endpoints do not require access tokens. [Learn more about relayers.](infrastructure/engine/guides/relayer) * Securely store access tokens and the thirdweb secret key. Rotate these credentials if they are compromised. * Use labels to keep track of your wallets, admins, and access tokens. * Use access token with expirations to grant time-bound access. * Regularly review the admins list to remove inactive and former team members. #### Backend wallets * Recommended: Use a wallet backed by AWS KMS or Google KMS. Wallet access is always recoverable and private keys are never exposed. * If using a local wallet: **back up the private key**. Engine cannot recover private keys if the encrypted stored data is lost or corrupted. * Ensure your backend wallets have sufficient funds. Use [wallet webhooks](https://portal.thirdweb.com/engine/features/webhooks) to alert when your gas balance is low. ## NFT Checkout This guide uses thirdweb Engine to sell NFTs with credit card: * A buyer pays with credit card. * Upon payment, your backend calls Engine. * Engine mints an NFT to the buyer's wallet. The buyer receives the NFT without requiring wallet signatures or gas funds. ![NFT checkout overview](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnft-checkout-overview.0a5bb1f2.png&w=3840&q=75) ### Prerequisites * A thirdweb client ID and secret key from your Team > Project > Settings page. * An Engine instance * A [backend wallet](https://portal.thirdweb.com/engine/features/backend-wallets) with currency to pay for gas * An [access token](https://portal.thirdweb.com/engine/features/authentication) for your Engine instance * A deployed NFT contract that can be claimed by the backend wallet * A [Stripe account](https://dashboard.stripe.com/register) on test mode (no real payments will be made) ### Frontend: Add Connect Wallet and credit card form Use [](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) to prompt the buyer for their wallet address. The buyer provides their credit card details and selects **Pay now** to send payment details directly to Stripe. ```tsx function Home() { return ( ); } ``` ```tsx // src/app/page.tsx function PurchasePage() { const buyerWalletAddress = useAddress(); const [clientSecret, setClientSecret] = useState(""); // Retrieve a Stripe client secret to display the credit card form. const onClick = async () => { const resp = await fetch("/api/stripe-intent", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ buyerWalletAddress }), }); const json = await resp.json(); setClientSecret(json.clientSecret); }; const stripe = loadStripe(""); return (
{!clientSecret ? ( ) : ( )}
); } ``` ```tsx const CreditCardForm = () => { const elements = useElements(); const stripe = useStripe(); const onClick = async () => { // Submit payment to Stripe. The NFT is minted later in the webhook. await stripe.confirmPayment({ elements, confirmParams: { return_url: "http://localhost:3000" }, redirect: "if_required", }); alert( "Payment success. The NFT will be delivered to your wallet shortly.", ); }; return ( <> ); }; ``` ### Backend: Get a Stripe client secret `POST /api/stripe-intent` returns a client secret which is needed to display the credit card form. ```tsx // src/app/api/stripe-intent/route.ts export async function POST(req: Request) { const { buyerWalletAddress } = await req.json(); const stripe = new Stripe("", { apiVersion: "2023-10-16", }); const paymentIntent = await stripe.paymentIntents.create({ amount: 100_00, currency: "usd", payment_method_types: ["card"], // buyerWalletAddress is needed in the webhook. metadata: { buyerWalletAddress }, }); return NextResponse.json({ clientSecret: paymentIntent.client_secret, }); } ``` ### Backend: Configure the Stripe webhook `POST /api/stripe-webhook` calls Engine to mint an NFT when a buyer is successfully charged. ```tsx // src/app/api/stripe-webhook/route.ts export const config = { api: { bodyParser: false }, }; export async function POST(req: NextRequest) { // Validate the webhook signature // Source: https://stripe.com/docs/webhooks#secure-webhook const body = await req.text(); const signature = headers().get("stripe-signature"); const stripe = new Stripe("", { apiVersion: "2023-10-16", }); // Validate and parse the payload. const event = stripe.webhooks.constructEvent( body, signature, "", ); if (event.type === "charge.succeeded") { const { buyerWalletAddress } = event.data.object.metadata; // Mint an NFT to the buyer with Engine. const engine = new Engine({ url: "", accessToken: "", }); await engine.erc1155.mintTo( "", "", "", { receiver: buyerWalletAddress, metadataWithSupply: { metadata: { name: "Engine Hackathon 2023", description: "Created with thirdweb Engine", image: "ipfs://QmakhKF5oMyxupCZ2RsmcvPRyYTHnQzYeb9mQGv3RM81n1/hat.webp", }, supply: "1", }, }, ); } return NextResponse.json({ message: "OK" }); } ``` ### Configure Stripe webhooks Navigate to the [Stripe webhooks dashboard (test mode)](https://dashboard.stripe.com/test/webhooks) and add the `/api/stripe-webhook` endpoint and send the `charge.succeeded` event. ### Try it out! Here’s what the user flow looks like. The buyer is prompted to provide their credit card. ![Initial page load](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnft-checkout-1.c405205e.png&w=1920&q=75) They provide their card details. > _Tip: Stripe testmode accepts `4242 4242 4242 4242` as a valid credit card._ ![Prompted for card details](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnft-checkout-2.28ea6e2b.png&w=1920&q=75) They are informed when their payment is submitted. ![Successful payment](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnft-checkout-3.b668c7c0.png&w=1920&q=75) ### Full code example The code above is simplified for readability. [View the full source code →](https://github.com/thirdweb-example/engine-nft-checkout) ### FAQ #### Can I accept different payment methods? Yes! You provide the payment provider and can accept different currencies (EUR, JPY), digital wallets (Apple Pay, Google Pay), bank payments (ACH, SEPA), local payment methods (UPI, iDEAL), and more. #### How is thirdweb NFT Checkout different? [thirdweb Checkout](https://thirdweb.com/checkout) is a full solution that detects fraud, provides chargeback liability, accepts multiple payment methods including cryptocurrency, includes a prebuilt checkout UX, and more. ## Security ### Data handling * Since Engine is self-hosted, you (the developer) maintain control over the server, database, logging, and observability. * Engine handles configuration data encrypted in transit and at rest. * Backend wallet signers are reconstructed only in memory on your Engine instance, and this data is never sent to thirdweb or other external platforms. * thirdweb may collect the following information: * Metrics on which accounts are using Engine * Anonymized metrics on usage * Transactions history * (TBD future data to power advanced analytics) ### Third-party security audit As of Jan 2024, Engine has received a thorough security audit and internal bug bounty program from HackerOne. A Letter of Attestation may be provided upon request. ### Responsible disclosure To report a security vulnerability, please contact [security@thirdweb.com](mailto:security@thirdweb.com). ### Legal * [Terms of Service](https://thirdweb.com/tos) * [Privacy Policy](https://thirdweb.com/privacy) ## Typescript SDK Update configuration, manage backend wallets, and call contracts in Typescript. All Engine APIs are accessible via SDK. ### Setup npmyarnpnpm `npm i @thirdweb-dev/engine ` ### Usage ```typescript import { Engine } from "@thirdweb-dev/engine"; const engine = new Engine({ url: "http://0.0.0.0:3005", accessToken: "", }); await engine.erc20.mintTo( // chain "", // contract address "0x365b83D67D5539C6583b9c0266A548926Bf216F4", // backend wallet address "0x43CAe0d7fe86C713530E679Ce02574743b2Ee9FC", // args matching the API reference { toAddress: "0x43CAe0d7fe86C713530E679Ce02574743b2Ee9FC", amount: "1.0", }, ); ``` ## Troubleshooting Here are helpful resources for debugging issues you may encounter while using thirdweb Engine. ### Sending transactions #### Received "UNPREDICTABLE\_GAS\_LIMIT" error **What it means** The RPC reported that this transaction failed simulation and is expected to fail onchain, and it is being rejected before it is sent. No gas is consumed. This error indicates the contract logic will throw an error (or "revert the execution"). Common reasons: minting from a token contract that has no claim condition, has not started the minting period, is out of supply, has the incorrect amount paid to it, the calling backend wallet does not have permissions to call the contract. **How to resolve** Try to simulate the transaction by passing the `?simulateTx=true` query parameter or using the thirdweb [Transaction Simulator](https://thirdweb.com/tools/transaction-simulator) to reveal the error message. #### The transaction failed onchain _Also known as: execution reverted_ **What it means** The transaction passed simulation but the execution was reverted onchain. This can occur if a change in state occurred, such as an NFT contract running out of supply before a transaction was mined. Another common reason is the transaction ran out of gas. You can verify this by checking the "More Details" section in your blockchain explorer and confirming if the gas usage reached the gas limit: ![Out of gas](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fengine-out-of-gas.01fbadb3.png&w=3840&q=75) **How to resolve** If the transaction failed due to onchain logic, try to simulate the transaction (see above) to identify the reason. If the gas limit was reached, you may try [manually overriding the gas settings](https://portal.thirdweb.com/engine/features/contracts#override-gas-settings). Engine automatically estimates the gas limit through simulation, and it is not recommended to override the gas limit unless the estimation is incorrect. #### Received "replacement transaction underpriced" error _Also known as: REPLACEMENT\_UNDERPRICED, already known_ **What it means** Engine has already submitted this or another transaction with the same nonce. That transaction is in mempool and waiting to be mined by the chain. Engine automatically manages nonces so this error typically should not occur. **How to resolve** It's possible the transactions are not being accepted by the mempool. To remediate this issue, you can retry a transaction, cancel it, or reset all backend wallet nonces. To retry a transaction, use [POST /transaction/sync-retry](https://thirdweb-engine.apidocumentation.com/reference#tag/transaction/POST/transaction/sync-retry) and provide the `queueId`. You may also provide a higher gas value to increase the likelihood of the transaction being mined. To cancel a transaction, use [POST /transaction/cancel](https://thirdweb-engine.apidocumentation.com/reference#tag/transaction/POST/transaction/cancel) and provide the `queueId`. #### Resetting the nonce may fail previous transactions Transactions that were sent but not yet mined may fail because new transactions will use the same nonce values as previously sent transactions. To reset the nonce for all backend wallets, use [POST /backend-wallet/reset-nonce](https://thirdweb-engine.apidocumentation.com/reference#tag/backend-wallet/POST/backend-wallet/reset-nonces) to force-sync the Engine nonces with the onchain values. #### Received "Insufficient funds for gas \* price + value" error _Also known as: Insufficient funds for intrinsic transaction cost_ **What it means** Your backend wallet has insufficient funds to complete the transaction. Note that on EVM blockchains, a transaction must place a _gas fee bid_ on a transaction that is higher than the amount that will actually get consumed. This means your wallet must have a minimum amount of gas in order to send transactions. You can estimate how much gas is needed. Adjust the values to your use case and chain. * `gas` ("gas limit"): The unit of gas that a transaction needs to complete. Assume an NFT mint that takes **120,000 gas**. * `maxFeePerGas`: The maximum amount of native token to bid, per gas. Assume **50 gwei**. * Amount of gas needed = **6,000,000,000,000,000 wei**. Assume the native currency is ETH which has 18 decimals, this equals 0.006 ETH. Even though the transaction is expected to consume less gas, the transaction will fail unless the wallet holds at least this much native gas currency. **How to resolve** Add more funds to your backend wallet. Or wait until the gas fees on the chain are lower and try again. ### Sending UserOps UserOps are **User Op**erations sent by a backend wallet on behalf of smart accounts, used in the Account Abstraction pattern. #### Received "Invalid UserOperation signature or paymaster signature" error _Also known as: code -32507_ **What it means** The backend wallet you are sending the transaction with does not have sufficient permissions to send a userOp for this account address. **How to resolve** Confirm if the backend wallet is a valid admin for this account. If you are using Session Keys, confirm they are not close to or already expired. #### Received "AA21 didn’t pay prefund" error **What it means** Your thirdweb API key used by Engine is not properly configured to use Account Abstraction, or you have a [sponsorship rule](https://portal.thirdweb.com/connect/account-abstraction/sponsorship-rules) that has been exceeded. **How to resolve** Confirm if the API key is tied to an account with valid payment. Also confirm if there are any sponsorship rule for the Engine API key. ## Self-Host Instructions Self-host Engine on your own infrastructure for free and manage your self-hosted Engine from the [thirdweb dashboard](https://thirdweb.com/team/~/~/engine). #### Want to avoid setup and maintenance? [Get Engine hosted by thirdweb.](https://thirdweb.com/team/~/~/engine/create) #### Requirements * [Docker](https://docs.docker.com/get-docker/) * A thirdweb secret key from your Team > Project > Settings page. * PostgresDB (version 14+) * Redis (version 7.2.4+) #### Running Engine locally Start Postgres: ```bash docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres ``` Start Redis: ```bash docker run -p 6379:6379 -d redis:7.2.4 ``` Start Engine server: ```bash docker run \ -e ENCRYPTION_PASSWORD="" \ -e THIRDWEB_API_SECRET_KEY="" \ -e ADMIN_WALLET_ADDRESS="" \ -e POSTGRES_CONNECTION_URL="postgresql://postgres:postgres@host.docker.internal:5432/postgres?sslmode=disable" \ -e ENABLE_HTTPS=true \ -e REDIS_URL="redis://host.docker.internal:6379/0" \ -p 3005:3005 \ --pull=always \ --cpus="0.5" \ thirdweb/engine:latest ``` ##### Environment variables | Variable (\* \= Required) | Description | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | ENCRYPTION\_PASSWORD\* | Provide a string to encrypt sensitive data stored in DB. Do _not_ change this value or encrypted data will be inaccessible. | | THIRDWEB\_API\_SECRET\_KEY\* | A thirdweb secret key created at the time of project (API Key) creation | | ADMIN\_WALLET\_ADDRESS\* | The wallet address that will configure Engine from the thirdweb dashboard. You will be able to add other admins later. | | POSTGRES\_CONNECTION\_URL\* | Postgres connection string: postgresql://\[user\[:password\]@\]\[host\]\[:port\]\[/dbname\]\[?param1=value1&...\] | | REDIS\_URL\* | Redis connection string: redis://\[user:password@\]host:port\[/db-number\] | | ENABLE\_HTTPS | Self-sign a certificate to serve API requests on HTTPS. Set to true if running Engine locally only. (Default: false) | | LOG\_LEVEL | Determines the logging severity level. Adjust for finer control over logged information. (Default: debug) | | PRUNE\_TRANSACTIONS | When false, Engine prevents the pruning/deletion of processed transaction data. (Default: true) | | ENABLE\_KEYPAIR\_AUTH | Enables [Keypair Authentication](https://portal.thirdweb.com/engine/features/keypair-authentication). | | TRUST\_PROXY | When true, trust the X-Forwarded-For header to allow Engine to use the correct client IP address for the IP allowlist. | \* Required Your server is running when this log line appears: ```bash Listening on https://localhost:3005. Manage your Engine from https://thirdweb.com/team/~/~/engine. ``` ##### Manage Engine from the dashboard To manage your Engine instance from the dashboard: * Navigate to `https://localhost:3005/json` * The "Your connection is not private" page will appear. * Select **Show advanced** and select **Proceed to localhost (unsafe)** to render the JSON file. * _This one-time step allows your browser to connect to your local Engine instance._ * Navigate to the [Engine dashboard page](https://thirdweb.com/team/~/~/engine). * Sign in with the `` wallet. * Select **Import** * Add your publicly accessible Engine URL. * If Engine is running locally, provide the URL `https://localhost:3005`. #### Running Engine in production See the [Production Checklist](https://portal.thirdweb.com/engine/production-checklist#cloud-hosting) for best practices using Engine in a production environment. * Pin Engine Docker to a version to control when changes are introduced. * `latest` may include major version changes which can introduce breaking changes. * Host Engine DB on any [Postgres-compatible database](https://www.postgresql.org/support/professional%5Fhosting/). * Remember to update `POSTGRES_CONNECTION_URL`. * Examples: [AWS RDS](https://aws.amazon.com/rds/postgresql/), [Google Cloud SQL](https://cloud.google.com/sql/docs/postgres), [Heroku](https://www.heroku.com/postgres), [Supabase](https://supabase.com/docs/guides/database/overview) * Minimum specs: 2 vCPU, 2 GB memory (AWS equivalent: t4g.small) * Minimum version: 14 * Add the `?connection_limit=10` param to your `POSTGRES_CONNECTION_URL` to increase the connection limit. * Host Engine server on any cloud provider. * Minimum specs: 1 vCPU, 2 GB memory (AWS equivalent: t2.small) * Auto-scale the instance count to increase inbound throughput and queuing capacity. * Remove the `ENABLE_HTTPS` env var. #### FAQ ##### Why is my Docker image unable to reach my Postgres database? Here are common troubleshooting tips: * Ensure the Postgres DB is running in Docker. `POSTGRES_CONNECTION_URL` should be set to `localhost` (if in the same container) or `host.docker.internal` (if in a different container). * Ensure the Postgres DB connection URL and credentials are correct. * Ensure the database name exists on the Postgres DB. See [Production Checklist](https://portal.thirdweb.com/engine/production-checklist#cloud-hosting) for best practices using Engine in a production environment. ##### Self-hosting recommendations * Do _not_ set the environment variable `ENABLE_HTTPS=true`. * Host Engine Docker on a cloud provider. * Minimum specs: 1 vCPU, 2 GB memory (AWS equivalent: t2.small) * Auto-scale the instance count to increase inbound throughput and queuing capacity. * Host Postgres DB on a cloud provider. * Examples: [AWS RDS](https://aws.amazon.com/rds/postgresql/), [Google Cloud SQL](https://cloud.google.com/sql/docs/postgres), [Heroku](https://www.heroku.com/postgres), [Supabase](https://supabase.com/docs/guides/database/overview) * Minimum specs: 2 vCPU, 2 GB memory (AWS equivalent: t4g.small) * Set the `connection_limit` parameter within your `POSTGRES_CONNECTION_URL` environment variable to `10`. ##### How do I filter logs in Engine? Configure log verbosity via the `LOG_LEVEL` environment variable. The severity levels ordered from highest to lowest are: * `fatal` : Terminates the program due to critical errors. * `error` : Highlights serious issues needing immediate action. * `warn` : Suggests caution due to potential issues. * `info` : Shares routine operational insights. * `debug` : Provides detailed debugging information. * `trace` : Offers in-depth tracing details. Engine by default captures logs at `debug` severity and higher. Setting `LOG_LEVEL` to `error` limits logging to only `error` and `fatal` severities. ```bash LOG_LEVEL="error" ``` ##### How to prevent `SIGSEGV` errors with the Engine docker image? Ensure the Engine docker image's stability by allocating a minimum of `0.5 vCPU & 1 GB memory` to the container, mitigating `SIGSEGV` (Segmentation Fault) errors due to inadequate resources or memory access issues. ##### How to mitigate Prisma errors related connections and/or prisma transactions? Engine recommends a minimum DB connections limit of `8` PER HOST. Please set the `connection_limit` parameter within your `POSTGRES_CONNECTION_URL` environment variable, to allow a connection limit between (8, # conns supported by your DB / # hosts). In practice, 10-20 is a suitable connection limit. DB Error: ```bash Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 10, connection limit: 3) ``` Example configuration: ```bash POSTGRES_CONNECTION_URL=postgres://postgres:postgres@localhost:5432/postgres?connection_limit=10 ``` ##### What is `x-forwarded-for` and how does it affect Engine? If you have engine running on a server behind a reverse proxy, you can set the `TRUST_PROXY` environment variable to `true` to trust the `X-Forwarded-For` header. Reverse proxies like Nginx or Apache will add this header to the request with the original client IP address, and setting this variable will allow Engine to use the correct IP address for the IP Allowlist. For more details on IP Allowlisting, refer to the [Security Features](https://portal.thirdweb.com/engine/features/security) page. ## Bundler A bundler is a node that monitors the alternative mempool of `UserOperations` and bundles multiple `UserOps` together to forward to the EntryPoint contract as a single transaction. These `UserOps` can be sent from different accounts and are bundled and sent to the `EntryPoint` contract via a `handleOps` call. The bundler is controlled by its own EOA which initially pays for the gas fees upfront and is then repaid by either the sender or a paymaster if the transaction is sponsored. The entry point contract then uses the `validateOp` and `executeOp` functions on the smart account contract to verify and execute the `UserOps` on behalf of the users. It allows you to send transactions with smart accounts. ## Engine Engine is an open-source, backend server that reads, writes, and deploys contracts at production scale. ### Why use Engine? Engine enables your app to: * Send multiple blockchain transactions at once. * Resubmit stuck transactions, handling nonce values, gas settings, and RPC errors. * Avoid duplicate transactions. * Manage multiple backend wallets and their funds. * Control access from your backends and team members. * Sponsor user gas fees. * Deploy and interact with smart accounts. * Subscribe to contract events and transactions. 🚀 [Get Engine hosted by thirdweb](https://thirdweb.com/team/~/~/engine/create) or [self-host for free](https://portal.thirdweb.com/engine/self-host). ![Engine overview](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fengine-overview.25c5a965.png&w=3840&q=75) Engine Engine is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-dev/engine) ### Standard Engine Supports 500 write transactions per second. Great for minting APIs, airdrops, and managing user wallets. ##### Features * **High transaction throughput** \- Transactions batched on the same block with nonces managed automatically. * **Secure backend wallets** \- Your backend wallets stored locally, on AWS KMS, or on Google KMS. * **Any contract on any EVM chain** \- Supports contract calls on all [1700+ EVM blockchains](https://thirdweb.com/chainlist) and private subnets. * **Contract deployments** \- Deploy smart accounts, tokens, NFTs, marketplaces, and more. * **Account abstraction** \- Use smart accounts and session keys to transact on behalf of your users. * **Built-in relayer** \- Sponsor gas for your users so reduce user friction. * **Event webhooks** \- Get notified of wallet and contract events to automate other actions like payments or emails. * **Contract subscriptions** \- Store event logs and transaction receipts to be queried later. * **Transaction observability** \- Debug transaction failures with detailed timelines, onchain errors, and gas details. * **Idempotency** \- Prevent costly, duplicate transactions. * **Production-ready web3 infrastructure** \- Includes RPC, IPFS, and Account Abstraction out of the box. ### Premium Engine Engine Premium provides added scaling and resilience. It include server autoscaling, server failover, database failover, and 30-day database backups. ##### Features * **_Everything in Standard Engine_** * **Autoscaling** \- Scale to millions of users with a fleet of Engine instances that scale up along with your traffic. * **Production-grade Server** \- High availability and redundancy. * **Production-grade Database** \- High availability, Multi-AZ. * **Database backups** \- Recoverability and peace of mind for your stored data (30-day database backups). ### Pricing Cloud-hosting Engine with thirdweb starts at $99 per month. Learn more about [Engine pricing](https://thirdweb.com/team/~/~/engine/create). Self-hosting Engine is always free. ### Get in touch For dedicated support and feature requests, [contact Sales](https://thirdweb.com/contact-us). ## Claiming Claiming is the process of transferring token ownership to the claimer's wallet. Once a token has been [lazy minted](https://portal.thirdweb.com/glossary/lazy-minting), it can be claimed by a wallet. ## Claim Phases Claim phases or "claim conditions" allow you to configure various aspects of a [drop](https://portal.thirdweb.com/glossary/drop); such as who can claim tokens, how many tokens will be released, the price of each token, release date, etc. They are available to use for any smart contract that implements the [Drop Single Phase](https://portal.thirdweb.com/contracts/build/extensions/general/DropSinglePhase)or [Drop](https://portal.thirdweb.com/contracts/build/extensions/general/Drop) extension smart contracts, which includes our ready-to-deploy smart contracts like the[NFT Drop](https://thirdweb.com/thirdweb.eth/DropERC721), [Token Drop](https://thirdweb.com/thirdweb.eth/DropERC20), and [Edition Drop](https://thirdweb.com/thirdweb.eth/DropERC1155) smart contracts. ## Delayed Reveal Delayed reveal is a feature that allows you to release NFTs in a [drop](https://portal.thirdweb.com/glossary/drop) with hidden content that can only be revealed at a later time. The owner of the smart contract (or a wallet with the appropriate permissions) can [lazy-mints](https://portal.thirdweb.com/glossary/lazy-minting) a batch of NFTs, along with placeholder metadata and a password. Until the NFTs are revealed using this password, the metadata of the NFTs will be the placeholder metadata, and the "real" metadata is not visible to external parties. This is achieved by using the password as an encryption/decryption key to encrypt the URI containing the "real" metadata. The encrypted URI is stored onchain, and the password is stored off-chain, only known by the owner. When the NFTs are revealed, the owner of the smart contract (or a wallet with the appropriate permissions) can decrypt the URI using the password, and the "real" metadata is revealed. [Learn more from our feature release product update](https://blog.thirdweb.com/delayed-reveal-nfts/). ## Drop A drop smart contract allows the owner of the contract to [lazy mint](https://portal.thirdweb.com/glossary/lazy-minting) NFTs _(unless it is an ERC20 drop)_, and have other users mint them, typically under the conditions defined in the smart contract’s [claim phases](https://portal.thirdweb.com/glossary/claim-phases), although these are not required. This is a common pattern for projects that want their community to be able to claim tokens: * The contract owner defines the metadata for the tokens: * For NFTs, this means they [lazy mint](https://portal.thirdweb.com/glossary/lazy-minting) the NFTs by providing the metadata for each NFT. * For ERC20 tokens, the token metadata is defined when the contract is deployed. * The contract owner defines how user’s can claim the tokens, optionally configuring [claim phases](https://portal.thirdweb.com/glossary/claim-phases). * Users can claim tokens by calling the `claim` function on the contract, which will mint the tokens to the user’s address. ## Externally Owned Account An Externally Owned Account (EOA) is an account controlled by the owner of the account's private key usually through a wallet application. Examples include MetaMask, Coinbase Wallet, and Phantom. ## Factory contract A factory contract is a smart contract that is used to deploy other smart contracts. ## Entry Point The EntryPoint is a singleton contract (a contract that has a predictable address that is the same on every chain and only one instance per chain). It has two methods that are used as entry points to execute bundles of UserOperations: `handleOps` and `handleAggregatedOps` which validate and execute user operation(s). ## Gas Fees All transactions (operations that change information stored on the blockchain) require a gas fee, which is used to cover the costs of the computational resources to execute that transaction. Gas fees are typically paid in the currency that is native to the blockchain you are interacting with. For example, if you are using the Ethereum blockchain, you will need to pay gas fees in Ether. While using thirdweb is free, you will need to cover the cost of performing actions that update the blockchain's state. This includes actions performed via the thirdweb [dashboard](https://thirdweb.com/team), our [SDKs](https://portal.thirdweb.com/contracts), or any of our other products, including: * Deploying smart contracts * [Lazy-minting](https://portal.thirdweb.com/glossary/lazy-minting) the metadata of your NFTs * Updating permissions on your smart contracts * Setting [claim phases](https://portal.thirdweb.com/glossary/claim-phases) [Learn more on the official Ethereum documentation](https://ethereum.org/en/developers/docs/gas/). ## Interoperability Interoperability refers to the ability of different networks to share data or assets (like tokens) and interact with each other. For example, if Blockchain A is interoperable with Blockchain B, it means that a user could send tokens from Blockchain A to Blockchain B in a way that's secure and verifiable on both chains. ## Gasless Transactions Gasless Transactions, also known as meta-transactions, are transactions that have the [gas fee](https://portal.thirdweb.com/glossary/gas)paid for by a third party instead of the transaction sender. Typically, this means the dApp owner covers the gas costs of their users' transactions, providing a more seamless user experience. This works by having the user sign a message that is then sent to a relayer, which pays the gas fee and forwards the transaction to the blockchain. You can attract a broader audience by removing the need to have gas to use your application. Engine offers multiple options for developers looking to sponsor gas for their users' transactions. ## IPFS IPFS (InterPlanetary File System) is a protocol to store files in a decentralized peer-to-peer network. Storing information on the blockchain is expensive and comes with significant size limitations, IPFS provides a way to store files in a decentralized manner _not_ on the blockchain, sometimes referred to as "off-chain" storage. To secure content on IPFS forever, a node must [pin](https://docs.ipfs.tech/concepts/persistence/) the content, otherwise, it may be discarded and therefore made unavailable.[Learn more about how IPFS works](https://ipfs.tech/#how). To read data from IPFS, an [IPFS Gateway](https://docs.ipfs.tech/concepts/ipfs-gateway/) is required. This allows you to access data from the IPFS protocol on browsers and other HTTP clients, such as when building an application using our [SDK](https://portal.thirdweb.com/contracts). Out of the box, all of our tools use [Storage](https://portal.thirdweb.com/storage) to store, pin, and retrieve data from IPFS via a gateway, currently powered by [Pinata](https://pinata.cloud/) under the hood. ## Lazy Minting Lazy minting is the preparation of NFT metadata without actually minting the NFT to a wallet address. This is a useful process for smart contract admins who want to prepare metadata for NFTs that will be minted by other wallets in a [drop](https://portal.thirdweb.com/glossary/drop),_without_ paying the [gas cost](https://portal.thirdweb.com/glossary/gas) to mint those NFTs. The typical process for lazy minting is: * Contract admin lazy-mints NFT metadata (either in bulk or for individual NFTs). * Contract admin defines how NFTs can be minted using [claim phases](https://portal.thirdweb.com/glossary/claim-phases). * Other wallets mint NFTs by claiming them. When they claim, they pay the gas cost to mint the NFT and the NFT is minted to their wallet address. ## Local Wallet A local wallet is a type of wallet that allows you to create wallets within your application or project. It is a non-custodial solution that simplifies the onboarding process by offering a "checkout as guest" experience. This improves the user experience for web3 apps in two ways: * It enables non-web3 native users to get started easily without having to create a wallet with an external provider like MetaMask. * It hides transaction confirmations from users. With a local wallet, you can generate wallets on the backend, and each app can have one wallet that is app-scoped. ## NFT A Non-fungible token (NFT) is a type of cryptographic token that represents something unique; non-fungible tokens are thus not mutually interchangeable. It is defined by the [ERC-721 standard](https://eips.ethereum.org/EIPS/eip-721), which is a standard for creating NFTs on the Ethereum blockchain. This is in contrast to ERC-20 tokens, which are 1:1 exchangeable. An analogy to highlight this difference is that an ERC-20 token is like a $20 bill, where the value of Sally's $20 bill is equivalent to the value of John's $20 bill. Think of an NFT as a collector's item, like a rare baseball card. Each card, or NFT, is unique and has different values based on the player, the year it was made, its condition, and other factors. When you buy a rare baseball card, you often get a certificate of authenticity and know the history of the card — who owned it, when it was sold, etc. The same applies to NFTs, but this information is recorded on the blockchain, making it transparent and impossible to forge. An NFT contains information on the token's provenance. The entire history of that NFT, including its creation and any subsequent transactions, is recorded on the blockchain, providing proof of authenticity and ownership. ## Non-Custodial Wallet A non-custodial wallet (also known as a self-custody wallet) is a wallet where the user has full control of their security & assets. The user is solely responsible for the security of their private key and therefore their funds. Examples of non-custodial wallets are Coinbase Wallet, Electron, and Ledger. ## Paymaster A paymaster is a smart contract that relays transactions. It provides a service that enables a third party to pay the transaction fee on behalf of the user by funding the paymaster in advance. The Paymaster acts as a gas reserve which then can be used during the call execution via the`EntryPoint` contract. The thirdweb paymaster is initially paid for by thirdweb. By using an [API key](https://portal.thirdweb.com/api-keys), the usage is tracked and billed. ## Permissionless On the context of smart contracts, permissionless means that anyone can interact with the contract without needing special permission or approval. Smart contracts can be deployed on public blockchains like Ethereum, promoting open access and transparency. While anyone can interact with a permissionless smart contract, the contract's code may still limit certain operations (like modifying the contract or accessing certain data) to specific roles, such as the contract's owner or creator. ## Composability Composability refers to the ability for different protocols and smart contracts to interact and build upon each other. It allows for the creation of new products and services without having to build everything from scratch. Thirdweb is completely composable. Each product can be used independently or in combination with other products. For example, you can use the [SDKs](https://portal.thirdweb.com/connect) or [Dashboard](https://thirdweb.com/team) with **any** contract. Similarly, you can use the [Solidity SDK](https://portal.thirdweb.com/contracts/build/overview)without using the [Dashboard](https://thirdweb.com/team) or [TypeScript/JavaScript SDK](https://portal.thirdweb.com/typescript/v5). So, if you already have your own workflow which works for you, you can pick and choose which products you want to use. ## Proxy Contracts A Proxy smart contract contains the [Storage](https://portal.thirdweb.com/storage) for an upgradable contract that allows you to modify its logic post-deployment. A smart contract is made up of (1) persistent state/storage, and (2) logic defined for how this state can be mutated. Upgrading a smart contract means changing the logic defined for how the smart contract’s state can be mutated. An “upgradeable smart contract” is two smart contracts considered together as one system: * **Proxy smart contract**: The smart contract whose state/storage we’re concerned with. * **Implementation smart contract**: A stateless smart contract that defines the logic for how the proxy smart contract’s state can be mutated. To _upgrade_ the smart contract, simply deploy a new implementation contract and call the upgrade function on the proxy contract to _upgrade_ to the new implementation. ## RPC URLs An RPC (Remote Procedure Call) URL is an endpoint that enables an application to communicate with a blockchain network. It is used to send requests (initiate transactions) and receive responses (read data) from the blockchain, enabling developers to build applications that interact with the blockchain. Out of the box, we provide free [RPC URLs](https://thirdweb.com/chainlist) for all supported blockchains, including All EVM-compatible networks. ## Minting Minting is the process of creating new tokens on the blockchain. These tokens can be any type of asset, such as ERC-20, ERC-721 or ERC-1155 tokens. Minting is usually done by the creator of the token (the default admin), but can also be done by anyone who has been given [permission](https://portal.thirdweb.com/contracts/build/extensions/general/Permissions) to mint tokens by the creator. Minting is enabled on contracts that implement a `mint` function. ## Signature-based Minting Signature-based minting, or "on-demand minting" allows a smart contract admin to generate signatures that can be used by other wallets to allow them to mint tokens on your smart contract in real-time. This allows you to conditionally generate signatures based on some condition/criteria, or allow a user to mint NFTs with metadata that you specify. Enabling use cases such as: * [Allowing NFT holders to mint for free](https://blog.thirdweb.com/guides/signature-drop/) * [Creating a community-made NFT collection](https://blog.thirdweb.com/guides/mint-nft-unique-code/) * [Restricted mints to users who are GitHub contributors](https://blog.thirdweb.com/guides/allow-github-contributors-to-mint-an-nft/) * [Restricted mints to Discord members](https://github.com/thirdweb-example/community-rewards) ## Smart Contract A smart contract is a computer program, stored on the blockchain. Smart contracts allow trustless transactions to be executed without third parties - the smart contract enforces the rules of the transaction automatically. These transactions are trackable and irreversible. Key features of smart contracts are: * **Autonomous**: Once a smart contract is initiated, it can act by itself without further participant involvement. * **Decentralized**: No single party has control over the entirety of the contract, and it cannot be modified after deployment. * **Deterministic**: Outcomes can be determined from the inputs and the contract code. ## Smart Account A Smart Account is a wallet that is controlled by a smart contract following the [ERC-4337 specification](https://eips.ethereum.org/EIPS/eip-4337). Ethereum has 2 types of accounts to transfer and receive tokens: EOAs (Externally Owned Accounts) and Contract Accounts. A smart contract wallet is a wallet managed by a contract account instead of an EOA. A smart account is a wallet type requiring **no private keys or seed phrases**. Smart contract wallets rely on code instead of private keys to secure and recover wallet information. Instead, you set _who_ and _under what conditions_, users may access the wallet via smart contracts. **A smart contract wallet is a type of Web3 wallet powered by smart contracts.** This smart account is unlocked by a 'key' - a personal account. This key can be anything from a [MetaMask wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.metamask) or even an [in-App Wallet](https://portal.thirdweb.com/typescript/v5/in-app-wallet) and is used as a way to 'sign in' to the wallet. Benefits of Smart Accounts: * Optimized transaction efficiency & batch transactions * Combine multiple transactions into a single transaction to save on [gas fees](https://portal.thirdweb.com/glossary/gas) * Improved Security Features * Social & Multi-Sig Recovery * Recover a wallet without seed phrases/passwords * Nominate a trusted person to recover your wallet in the case of an emergency ### Terminology #### UserOperations This is the data structure for the transaction that the user wants to perform. It contains the following fields: * `sender`: The account making the operation. * `nonce`: Anti-replay parameter; also used as the salt for first-time account creation. * `initCode`: The initialization code needed to create the account (needed if and only if the account is not yet onchain). * `callData`: The data to pass to the `sender` during the operation. * `callGasLimit`: The amount of gas to allocate for the operation. * `verificationGasLimit`: The amount of gas to allocate for the verification step. * `preVerificationGas`: The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata. * `maxFeePerGas`: Maximum fee per gas (similar to [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) `max_fee_per_gas`). * `maxPriorityFeePerGas`: Maximum priority fee per gas (similar to [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)). * `paymasterAndData`: Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction). * `signature`: Data passed into the account along with the nonce during the verification step. Should depend on the `chainid` and `EntryPoint` address to prevent replay attacks. #### EntryPoint The EntryPoint is a singleton contract (a contract that has a predictable address that is the same on every chain). It has two methods that are used as entry points to execute bundles of UserOperations: `handleOps` and `handleAggregatedOps`. #### Bundler (relayer) A bundler is a smart contract that bundles multiple 'UserOperations' into a single bundle, a `handleOps` call, to the `EntryPoint` contract. #### Paymaster A paymaster is a smart contract that relays transactions. It provides a service that enables a third party to pay the transaction fee on behalf of the user by funding the paymaster in advance. The Paymaster acts as a gas reserve which then can be used during the call execution via `EntryPoint`. The thirdweb [Account ABstraction](https://portal.thirdweb.com/connect/account-abstraction) paymaster is initially paid for by thirdweb. By using an API key, the usage is tracked and billed. ## Soulbound Tokens Soulbound tokens refer to NFTs that are permanently attached to a specific wallet address on the blockchain. Once a soulbound token is created, it cannot be transferred, sold, or traded to another address. ## Token A token is a type of digital asset that represents a particular value or utility. Tokens are defined by smart contracts which follow a token standard such as the ERC-20, ERC-1155 or ERC-721 standards. Tokens are a critical component of decentralized applications (dApps) built on top of blockchain platforms. They can incentivize certain behaviors, represent ownership of digital or physical assets, or facilitate transactions within the dApp's ecosystem. ## Wallet A wallet is a user's way of interacting with the blockchain. Wallets can be used to store, send, and receive blockchain assets such as ERC-20 tokens and NFTS. ## Staking Staking is the process of locking up tokens to support the operations of a blockchain network. In return for staking, users receive rewards in the form of additional tokens. Staking is a key element of Proof of Stake (PoS) consensus mechanisms, which are used by many blockchains to secure their networks. When you stake your tokens, you essentially lock them up in the network for a certain period. Depending on the specific protocol, staking your tokens might allow you to participate in network governance (voting on various decisions), validate transactions, and earn rewards. Staking serves the dual purpose of incentivizing participants to operate in the best interest of the network (since they have a financial stake in it) and deter malicious activity (since malicious actors stand to lose their staked tokens). ## Glossary This section aims to guide you through web3 concepts, including [EIPs](https://eips.ethereum.org/) and thirdweb-specific innovations. | Term | Description | | ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [Claim phases](https://portal.thirdweb.com/glossary/claim-phases) | Claim phases or "claim conditions" allow you to configure various aspects of a drop; such as who can claim tokens, how many tokens will be released, the price of each token, release date, etc. | | [Claiming](https://portal.thirdweb.com/glossary/claiming) | Claiming is the process of transferring token ownership to the claimer's wallet.. | | [Composability](https://portal.thirdweb.com/glossary/composability) | Composability refers to the ability for different protocols and smart contracts to interact and build upon each other. | | [Delayed reveal](https://portal.thirdweb.com/glossary/delayed-reveal) | Delayed reveal is a feature that allows you to release NFTs in a drop with hidden content that can only be revealed at a later time. The owner of the smart contract (or a wallet with the appropriate permissions) can lazy-mint a batch of NFTs, along with placeholder metadata and a password. | | [Drop](https://portal.thirdweb.com/glossary/drop) | A drop smart contract allows the owner of the contract to lazy mint NFTs (unless it is an ERC20 drop), and have other users mint them, typically under the conditions defined in the smart contract’s claim phases, although these are not required. | | [Externally Owned Account](https://portal.thirdweb.com/glossary/externally-owned-account) | An Externally Owned Account (EOA) is an account controlled by the owner of the account's private key. | | [Factory Contract](https://portal.thirdweb.com/glossary/factory-contract) | A factory contract is a smart contract that is used to deploy other smart contracts. | | [Gas fees](https://portal.thirdweb.com/glossary/gas) | All transactions (operations that change information stored on the blockchain) require a gas fee, which is used to cover the costs of the computational resources to execute that transaction. | | [Gasless Transactions](https://portal.thirdweb.com/glossary/gasless-transactions) | Gasless transactions, also known as meta-transactions, are transactions that have the gas fee paid for by a third party instead of the transaction sender. Typically, this means the dApp owner covers the gas costs of their users' transactions, providing a more seamless user experience. | | [Interoperability](https://portal.thirdweb.com/glossary/interoperability) | Interoperability refers to the ability of different networks to share data or assets (like tokens) and interact with each other. | | [IPFS](https://portal.thirdweb.com/glossary/ipfs) | IPFS is a protocol to store files in a decentralized peer-to-peer network. | | [Lazy minting](https://portal.thirdweb.com/glossary/lazy-minting) | Lazy minting is the preparation of NFT metadata without actually minting the NFT to a wallet address. | | [Local Wallet](https://portal.thirdweb.com/glossary/local-wallet) | A local wallet is a type of wallet that allows you to create wallets within your application or project. | | [Minting](https://portal.thirdweb.com/glossary/minting) | Minting is the process of creating new tokens on the blockchain.. | | [NFT](https://portal.thirdweb.com/glossary/nft) | A Non-fungible token (NFT) is a type of cryptographic token that is not mutually interchangeable. | | [Non-custodial Wallet](https://portal.thirdweb.com/glossary/non-custodial-wallet) | A non-custodial wallet (also known as a self-custody wallet) is a wallet where the user is solely responsible for their private key. | | [Permissionless](https://portal.thirdweb.com/glossary/permissionless) | Anyone can interact with a smart contract without needing special permission or approval. | | [Proxy Contracts](https://portal.thirdweb.com/glossary/local-wallet) | A Proxy smart contract contains the [Storage](https://portal.thirdweb.com/storage) for an upgradable contract that allows you to modify its logic post-deployment. | | [RPC URL](https://portal.thirdweb.com/glossary/rpc) | An RPC URL is an endpoint that enables an application to communicate with a blockchain network. It is used to send requests (initiate transactions) and receive responses (read data) from the blockchain, enabling developers to build applications that interact with the blockchain. | | [Signature-based minting](https://portal.thirdweb.com/glossary/signature-based-minting) | Signature-based minting, or "on-demand minting" allows a smart contract admin to generate signatures that can be used by other wallets to allow them to mint tokens on your smart contract in real-time. | | [Smart Contract](https://portal.thirdweb.com/glossary/smart-contract) | A smart contract is a computer program, stored on the blockchain. | | [Smart Wallet](https://portal.thirdweb.com/glossary/smart-wallet) | A Smart Wallet is a wallet that is controlled by a smart contract following the [ERC-4337 specification](https://eips.ethereum.org/EIPS/eip-4337). | | [Soulbound tokens](https://portal.thirdweb.com/glossary/soulbound) | Soulbound tokens refer to NFTs that are permanently attached to a specific wallet address on the blockchain. | | [Staking](https://portal.thirdweb.com/glossary/staking) | Staking is the process of locking up tokens to support the operations of a blockchain network. | | [Token](https://portal.thirdweb.com/glossary/token) | A token is a type of digital asset that represents a particular value or utility. | | [Wallet](https://portal.thirdweb.com/glossary/wallet) | A wallet is a user's way of interacting with the blockchain.. | | [Bundler](https://portal.thirdweb.com/glossary/bundler) | A bundler is a node that monitors the alternative mempool of UserOperations and bundles multiple UserOps together to forward to the EntryPoint contract as a single transaction. | ## Blueprints A blueprint is an API that provides access to on-chain data in a user-friendly format. There's no need for ABIs, decoding, RPC, or web3 knowledge to fetch blockchain data. Every chain exposes the default blueprints below All blueprints support [multichain queries](https://portal.thirdweb.com/insight/multichain-queries)! ### Events Blueprint Blockchain events offers developers a powerful way to track and analyze blockchain events emitted by smart contracts. This endpoint provides access to detailed event information, such as the address of the contract that generated the event, the transaction that triggered it, and when and where the event occurred on the blockchain. By offering data points like event topics, block numbers, and transaction hashes, developers can easily filter and search for specific event types, such as token transfers or contract executions. With precise timestamps and block references, the Events Blueprint ensures that developers have real-time access to critical on-chain activity, enabling them to build responsive, high-performance applications that can monitor, analyze, and react to blockchain events seamlessly. Whether working on DeFi, NFTs, or general dApps, this endpoint helps unlock the full potential of blockchain data in any project. #### Blueprint details | Name | Description | Example | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Address | The address is the identifier of the smart contract or account that emitted the event. It tells you who or what generated the event. | If the event is related to an ERC-20 token transfer, the address would be the smart contract address of the token. For instance, if you're tracking events for the USDT token, the address would be the contract address of USDT on Ethereum. | | Chain ID | The chain\_id is a unique identifier for the blockchain network where the event occurred. Different blockchain networks (e.g., Ethereum, Binance Smart Chain, Polygon) have their own unique chain IDs. | Ethereum's mainnet has a chain\_id of 1, while Binance Smart Chain has a chain\_id of 56\. This field ensures you know which network the event is coming from, which is crucial when interacting with multiple EVM chains. | | Data | The data field contains additional information specific to the event. In many cases, it's the raw output of the smart contract event. | In an ERC-20 Transfer event, the data might include the number of tokens transferred in raw hexadecimal format. For instance, if 1000 USDT were transferred, this value would be encoded in the event's data field. | | Log Index | The log\_index is the order of the log (event) in the list of all events within the block. It helps you pinpoint exactly where this event is located in the block. | If multiple events occurred within the same block (e.g., multiple token transfers), the log\_index tells you the sequence of this particular event. For example, it might be the 3rd event in the block. | | Topics | The topics array contains indexed parameters of the event, often used for filtering or categorizing events. The first topic contains the event signature (the function name), while the remaining topics contain indexed event arguments. | In an ERC-20 Transfer event, the first topic would be the hash of the event signature Transfer(address,address,uint256). The second topic would be the sender's address, and the third would be the receiver's address. This allows filtering to track all Transfer events for a specific address. | | Transaction Hash | The transaction\_hash is the unique identifier for the transaction that triggered the event. It helps you link the event to the specific transaction that caused it. | If you transfer 1 ETH to another wallet, the transaction hash might be 0x5c7b6f... which uniquely identifies that transaction. Using this hash, you can look up the transaction in any block explorer (e.g., Etherscan) to see all the details. | | Transaction Index | The transaction\_index tells you the position of the transaction within the block. This helps you identify where in the block this particular transaction was placed relative to others. | If multiple transactions occurred within the same block (e.g., multiple token transfers), the transaction\_index tells you the sequence of this particular transaction. For example, it might be the 3rd transaction in the block. | | Block Hash | A block\_hash is the unique identifier of a block, generated after the block is confirmed. It's like a tamper-proof record of all the transactions and events in that block. | If you wanted to verify that a particular transaction or event was part of a block, you could use the block hash to check its integrity. Think of it as a digital signature for the entire block, such as 0x91d... representing all transactions within that specific block. | | Block Number | The block\_number indicates the position of the block in the blockchain. It tells you when (in terms of blockchain sequence) the event occurred. | Block number 12,345,678 on Ethereum might contain transactions from a particular moment, such as the transfer of 10 ETH between two accounts. You can think of block numbers like page numbers in a ledger. | | Block Timestamp | The block\_timestamp is the exact time when the block was mined and added to the blockchain. | If block 12,345,678 was mined on July 1, 2023, at 12:30 PM UTC, the timestamp will reflect this exact moment. This helps you pinpoint when an event, such as a token transfer, actually happened in real time. | ### Transactions Blueprint Transaction data equips developers with the tools they need to interact with blockchain data efficiently and effectively. By providing clear, actionable insights into each transaction, the API helps streamline tasks like monitoring smart contract interactions, tracking asset transfers, and debugging. Developers can rely on this endpoint to access essential transaction details, enabling faster troubleshooting and more informed decision-making. Whether building DeFi platforms, dApps, or blockchain-based analytics tools, transaction data is the essence for all interactions with any chains. #### Blueprint details | Name | Description | Example | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | From Address | This is the address that initiated the transaction. It represents the sender who paid for the gas to execute the transaction. | If a user sends 1 ETH from their wallet, the from\_address will be the sender's Ethereum address, such as 0xabc123.... | | To Address | This is the recipient of the transaction. It could be another wallet or a smart contract. | If sending ETH to a friend, their wallet address, like 0xdef456..., would be the to\_address. In the case of interacting with a DeFi platform, the address of the smart contract being called would be the to\_address. | | Hash | The unique identifier (hash) of the transaction. This hash can be used to look up and verify the transaction on the blockchain. | A transaction might have a hash like 0x5c7b6f.... You can use this hash to check the transaction status on a block explorer like Etherscan. | | Value | This is the amount of cryptocurrency (in wei) being transferred in the transaction. | If transferring 1 ETH, the value would be 1,000,000,000,000,000,000 wei (1 ETH = 10^18 wei). | | Gas | This is the maximum amount of gas units the sender is willing to pay for the transaction to be processed. It limits how much work the transaction can perform on the blockchain. | A simple ETH transfer might require 21,000 gas, while calling a complex smart contract function could require significantly more, such as 100,000 gas. | | Gas Price | The price per gas unit the sender is willing to pay, expressed in wei (the smallest unit of ETH). The total transaction cost is calculated as gas \* gas\_price. | If the gas\_price is 100 gwei (1 gwei = 1 billion wei), the sender will pay 100 gwei \* 21,000 gas for a basic ETH transfer. | | Max Fee Per Gas | This is the maximum amount of gas fees (in wei) the sender is willing to pay for each gas unit. It was introduced in EIP-1559 to provide a cap on gas costs. | If max\_fee\_per\_gas is set to 200 gwei, the sender is ensuring that they will never pay more than this for each gas unit, even during periods of high network congestion. | | Max Priority Fee Per Gas | This is the maximum additional fee the sender is willing to pay to incentivize miners to prioritize their transaction. Also introduced in EIP-1559. | A transaction might specify a max\_priority\_fee\_per\_gas of 2 gwei, which acts as a "tip" for miners to get their transaction included faster in a block. | | Data | The data field contains additional information required by a transaction, such as the input parameters for interacting with a smart contract. | In a call to a DeFi contract's swap function, the data field will include the encoded function call and arguments (e.g., token amount, recipient address). | | Nonce | The nonce is the number of transactions sent from the sender's address. It ensures that transactions are processed in the correct order and prevents double-spending. | If the sender has sent 5 transactions before, the nonce will be 5\. This helps in tracking the sequence of transactions and ensuring that each one is processed correctly. | | Transaction Index | The position of the transaction within the block. It indicates the order in which the transaction was included relative to other transactions | If the transaction\_index is 5, this was the 6th transaction included in the block. | | Transaction Type | The type of transaction, typically either legacy (type 0x0 ) or one of the newer types introduced in EIP-1559 (e.g., type 0x2 for transactions that use the new gas fee mechanism). | A transaction\_type of 0x2 indicates the transaction follows the new EIP-1559 rules for gas fees. | | Access List | The access\_list is an optional field introduced in EIP-2930 that specifies which addresses and storage slots the transaction intends to interact with. It's used to optimize gas costs by pre-declaring the data access needed. | When a transaction interacts with a smart contract, the access\_list may declare the contract address and storage slots the transaction intends to read from or write to. For example, interacting with a DeFi smart contract could include its contract address and the storage slots holding user balances. | | Chain ID | The chain\_id identifies the blockchain network on which the transaction was conducted. It prevents replay attacks across different networks. | On Ethereum mainnet, the chain ID is 1, while on Base Mainnet, the chain ID is 8453 . This field tells you which network the transaction belongs to. | | Block Hash | This is the unique identifier (or "fingerprint") of the block that includes this transaction. The hash ensures that the block hasn't been altered. | If the transaction is included in block 12,345,678, the block's hash might look like 0xabc123..., and this hash can be used to reference that particular block on the blockchain. | | Block Number | The block\_number indicates the specific position of the block in the blockchain that contains the transaction. | If a transaction is included in block 12,345,678, this number can be used to quickly locate the block and all the transactions it contains. | | Block Timestamp | This is the exact time when the block containing the transaction was mined and added to the blockchain. | If the transaction was confirmed on July 1, 2023, at 12:30 PM UTC, the block timestamp will reflect this moment. It's useful for analyzing when specific activities (like token transfers) occurred. | | r, s, v | These are the cryptographic components of the transaction signature. They prove that the transaction was signed by the private key associated with the sender's address. | The r, s, and v values are produced during the signing process and are necessary to verify the authenticity of the transaction on the blockchain. | ### Tokens Blueprint Tokens on blockchain can be of different standards, but ones of the most widely used ones are: * ERC-20 for fungible tokens * ERC-721 and ERC-1155 for NFTs This blueprint provides access to such tokens' balances information for a given owner address. #### Blueprint details ##### ERC-20 balances of an address ```yaml GET /v1/{clientId}/tokens/erc20/:ownerAddress ``` Path Parameters: * `ownerAddress` _(required)_: The address of the owner of the tokens. * `clientId` _(required)_: The thirdweb client ID of your project. Successful response schema: ```json [ { "tokenAddress": "…", "balance": "…" } ] ``` ##### ERC-721 tokens of an address ```yaml GET /v1/{clientId}/tokens/erc721/:ownerAddress ``` Path Parameters: * `ownerAddress` _(required)_: The address of the owner of the tokens. * `clientId` _(required)_: The thirdweb client ID of your project. Successful response schema: ```json [ { "collectionAddress": "…", "tokenId": "…", "balance": "…" } ] ``` ##### ERC-1155 tokens of an address ```yaml GET /v1/{clientId}/tokens/erc1155/:ownerAddress ``` Path Parameters: * `ownerAddress` _(required)_: The address of the owner of the tokens. * `clientId` _(required)_: The thirdweb client ID of your project. Successful response schema: ```json [ { "collectionAddress": "…", "tokenId": "…", "balance": "…" } ] ``` ## Insight FAQs More information coming soon. ## For Agents & LLMs Insight is a powerful tool that can be used to power AI agents and LLMs with blockchain data. To use the API in your AI agent you can use the llms.txt file bellow. * [llms.txt file](https://portal.thirdweb.com/insight/agents-and-llms/llmstxt) * For developers who prefer working with OpenAPI specifications, our complete API documentation is available in OpenAPI format [here](https://insight.thirdweb.com/openapi.json). If you prefer to use the API in an LLM prompt, the schema below can be copied and pasted into the AI assistant of your choice. Feed this to your assistant, then ask your assistant to construct Insight queries on your behalf, asking it for certain onchain information. ```markdown # ATTENTION LLMs - API Usage Instructions ## API URL ```typescript const baseUrl = `https://{{chainId}}.insight.thirdweb.com`; ``` ## Authentication The API supports three authentication methods: ```typescript // 1. Header Authentication const headers = { "x-client-id": "{{clientId}}", // thirdweb Client ID }; // 2. Query Parameter const url = "https://{{chainId}}.insight.thirdweb.com/v1/events?clientId={{clientId}}"; // 3. Bearer Token const headers = { Authorization: "Bearer {{jwtToken}}", }; // Example using fetch with header auth async function getEvents() { const response = await fetch("https://{{chainId}}.insight.thirdweb.com/v1/events", { headers: { "x-client-id": "{{clientId}}", }, }); return await response.json(); } ``` ## Core Concepts ### Chain IDs - As a subdomain: ```typescript // Example const baseUrl = `https://{{chainId}}.insight.thirdweb.com`; ``` - As a query parameter (this is useful if you want to query multiple chains): ```typescript // Example for a single chain const url = `https://insight.thirdweb.com/v1/events?chain={{chainId}}`; // Example for multiple chains const url = `https://insight.thirdweb.com/v1/events?chain=1&chain=137`; ``` We won't duplicate multichain examples for each endpoint, but you can pass multiple chains in the query parameters pretty much everywhere! ### Base Response Structure ```typescript interface BaseResponse { data: T[]; meta: { chain_id: number; // Required page: number; // Required limit: number; // Required total_items: number; // Required total_pages: number; // Required address?: string; // Optional signature?: string; // Optional } } // Example response from getting events { "data": [ { "chain_id": 1, "block_number": "{{blockNumber}}", "transaction_hash": "{{transactionHash}}", "address": "{{contractAddress}}", "data": "{{data}}", "topics": ["{{topic}}"] } ], "meta": { "chain_id": 1, "page": 0, "limit": 20, "total_items": 150, "total_pages": 8 } } ``` ## API Examples ### Events API ```typescript // 1. Get All Events async function getAllEvents() { const response = await fetch("https://{{chainId}}.insight.thirdweb.com/v1/events", { headers: { "x-client-id": "{{clientId}}" }, }); return await response.json(); } // 2. Get Contract Events with Filtering async function getContractEvents(contractAddress: string) { const params = new URLSearchParams({ filter_block_number_gte: blockNumber, sort_by: "block_timestamp", sort_order: "desc", limit: "{{limit}}", }); const url = `https://{{chainId}}.insight.thirdweb.com/v1/events/{{contractAddress}}?${params}`; const response = await fetch(url, { headers: { "x-client-id": "{{clientId}}" }, }); return await response.json(); } ``` ### Token Balance API ```typescript // 1. Get ERC20 Balances async function getERC20Balances(ownerAddress: string) { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc20/${ownerAddress}`, { headers: { "x-client-id": "{{clientId}}" } }, ); const data = await response.json(); // Example response: // { // "data": [ // { // "tokenAddress": "0x123...", // "balance": "1000000000000000000" // } // ] // } return data; } // 2. Get NFT Balances async function getNFTBalances(ownerAddress: string) { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc721/${ownerAddress}`, { headers: { "x-client-id": "{{clientId}}" } }, ); const data = await response.json(); // Example response: // { // "data": [ // { // "collectionAddress": "0x456...", // "tokenId": "1", // "balance": "1" // } // ] // } return data; } ``` ### Using Filters ```typescript // Example: Get events with complex filtering async function getFilteredEvents() { const params = new URLSearchParams({ // Block filters filter_block_number_gte: blockNumberStart, filter_block_number_lte: blockNumberEnd, // Time filters filter_block_timestamp_gte: "{{timestamp}}", // Transaction filters filter_from_address: "{{fromAddress}}", filter_value_gte: "{{value}}", // 1 ETH // Pagination page: "{{page}}", limit: "{{limit}}", // Sorting sort_by: "{{sortBy}}", sort_order: "{{sortOrder}}", }); const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/events?${params}`, { headers: { "x-client-id": "{{clientId}}" } }, ); return await response.json(); } ``` ### Error Handling ```typescript async function safeApiCall() { try { const response = await fetch("https://{{chainId}}.insight.thirdweb.com/v1/events", { headers: { "x-client-id": "{{clientId}}" }, }); if (!response.ok) { const errorData = await response.json(); // Example error response: // { "error": "Invalid client ID" } throw new Error(errorData.error); } return await response.json(); } catch (error) { console.error("API Error:", error.message); throw error; } } ``` ## API Reference ### Events API 1. **Get All Events** ```typescript GET /v1/events interface EventsResponse { data: Event[]; meta: MetaData; } ``` 2. **Get Contract Events** ```typescript GET /v1/events/:contractAddress ``` 3. **Get Specific Event Type** ```typescript GET /v1/events/:contractAddress/:signature ``` ### Transactions API 1. **Get All Transactions** ```typescript GET /v1/transactions ``` 2. **Get Contract Transactions** ```typescript GET /v1/transactions/:contractAddress ``` 3. **Get Specific Transaction Type** ```typescript GET /v1/transactions/:contractAddress/:signature ``` ### Token Balance API 1. **ERC20 Balances** ```typescript GET /v1/tokens/erc20/:ownerAddress interface ERC20Response { data: { tokenAddress: string; // Required balance: string; // Required }[]; } ``` 2. **ERC721 & ERC1155 Balances** ```typescript GET /v1/tokens/erc721/:ownerAddress GET /v1/tokens/erc1155/:ownerAddress interface TokenBalanceResponse { data: { collectionAddress: string; // Required tokenId: string; // Required balance: string; // Required }[]; } ``` ## Query Parameters ### Common Parameters ```typescript interface CommonQueryParams { page?: number; // Default: 0 limit?: number; // Default: 20, must be > 0 sort_by?: "block_number" | "block_timestamp" | "transaction_index"; sort_order?: "asc" | "desc"; group_by?: string; // Group results by a specific field aggregate?: string[]; // Apply aggregate functions (count, sum, avg, etc.) to grouped results } ``` ### Filter Types 1. **Block Filters** ```typescript interface BlockFilters { filter_block_number?: number; // Example: 1000000 filter_block_number_gte?: number; // Example: 1000000 filter_block_number_gt?: number; // Example: 1000000 filter_block_number_lte?: number; // Example: 1000000 filter_block_number_lt?: number; // Example: 1000000 filter_block_hash?: string; // Example: "0x3a1fba5..." } ``` 2. **Time Filters** ```typescript interface TimeFilters { filter_block_timestamp?: number; // Example: 1715222400 filter_block_timestamp_gte?: number; // Example: 1715222400 filter_block_timestamp_gt?: number; // Example: 1715222400 filter_block_timestamp_lte?: number; // Example: 1715222400 filter_block_timestamp_lt?: number; // Example: 1715222400 } ``` 3. **Transaction Filters** ```typescript interface TransactionFilters { filter_transaction_index?: number; filter_transaction_hash?: string; filter_from_address?: string; filter_value?: string; // Value in wei (e.g., "1000000000000000000" for 1 ETH) filter_value_gte?: string; filter_value_gt?: string; filter_value_lte?: string; filter_value_lt?: string; filter_gas_price?: number; filter_gas?: number; // Additional gte, gt, lte, lt variants for numeric fields } ``` ## Error Handling All endpoints return standard error responses for 400 and 500 status codes: ```typescript // 400 Bad Request // 500 Internal Server Error interface ErrorResponse { error: string; // Required } ``` ``` ## Thirdweb Insight Insight is a powerful tool that lets you retrieve blockchain data from any EVM chain, enrich it with metadata, and transform it using custom logic. Whether you're building a gaming inventory system, tracking DeFi metrics, or analyzing NFT collections, Insight makes it easy to get the data you need with simple API calls. ### Things to Keep in Mind * **Rate Limiting**: The API has rate limits based on your authentication tier. Monitor your usage and implement appropriate retry logic. * **Pagination**: When retrieving large datasets, use pagination parameters (`page` and `limit`) to avoid timeouts and manage response sizes effectively. * **Chain Selection**: Always verify you're querying the correct chain ID. Using an incorrect chain ID will return a 404 error. * **Data Freshness**: There may be a slight delay between on-chain events and their availability in the API due to block confirmation times. * **Error Handling**: Implement proper error handling for both HTTP errors (400/500) and network issues. Consider implementing retries for transient failures. * **Query Optimization**: * Use specific filters to reduce response size and improve performance * Avoid overly broad date ranges when possible * Consider using aggregations for large datasets * **Authentication**: Keep your authentication credentials secure and don't expose them in client-side code. * **Response Processing**: Some numeric values are returned as strings to maintain precision. Convert them appropriately in your application. ### API URL ```typescript const baseUrl = `https://{{chainId}}.insight.thirdweb.com`; ``` ### Authentication The API supports three authentication methods: ```typescript // 1. Header Authentication const headers = { "x-client-id": "{{clientId}}", // thirdweb Client ID }; // 2. Query Parameter const url = `https://{{chainId}}.insight.thirdweb.com/v1/events?clientId={{clientId}}`; // 3. Bearer Token const headers = { Authorization: "Bearer {{jwtToken}}", }; // Example using fetch with header auth async function getEvents() { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/events`, { headers: { "x-client-id": "{{clientId}}", }, }, ); return await response.json(); } ``` ### Core Concepts #### Chain IDs The API supports chain IDs in the following formats: * As a subdomain: ```typescript // Example const baseUrl = `https://{{chainId}}.insight.thirdweb.com`; ``` * As a query parameter (this is useful if you want to query multiple chains): ```typescript // Example for a single chain const url = `https://insight.thirdweb.com/v1/events?chain={{chainId}}`; // Example for multiple chains const url = `https://insight.thirdweb.com/v1/events?chain=1&chain=137`; ``` We won't duplicate multichain examples for each endpoint, but you can pass multiple chains in the query parameters pretty much everywhere! #### Base Response Structure ```typescript interface BaseResponse { data: T[]; meta: { chain_id: number; // Required page: number; // Required limit: number; // Required total_items: number; // Required total_pages: number; // Required address?: string; // Optional signature?: string; // Optional } } // Example response from getting events { "data": [ { "chain_id": 1, "block_number": "17859301", "transaction_hash": "0x123...", "address": "0x456...", "data": "0x789...", "topics": ["0xabc..."] } ], "meta": { "chain_id": 1, "page": 0, "limit": 20, "total_items": 150, "total_pages": 8 } } ``` ### API Examples #### Events API ```typescript // 1. Get All Events async function getAllEvents(): Promise> { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/events`, { headers: { "x-client-id": "{{clientId}}" }, }, ); return await response.json(); } // 2. Get Contract Events with Filtering async function getContractEvents( contractAddress: string, ): Promise> { const params = new URLSearchParams({ filter_block_number_gte: "{{blockNumber}}", sort_by: "block_timestamp", sort_order: "desc", limit: "50", }); const url = `https://{{chainId}}.insight.thirdweb.com/v1/events/${contractAddress}?${params}`; const response = await fetch(url, { headers: { "x-client-id": "{{clientId}}" }, }); return await response.json(); } ``` #### Token Balance API ```typescript // 1. Get ERC20 Balances async function getERC20Balances( ownerAddress: string, ): Promise { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc20/${ownerAddress}`, { headers: { "x-client-id": "{{clientId}}" } }, ); const data = await response.json(); // Example response: // { // "data": [ // { // "tokenAddress": "0x123...", // "balance": "1000000000000000000" // } // ] // } return data; } // 2. Get NFT Balances async function getNFTBalances(ownerAddress: string) { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc721/${ownerAddress}`, { headers: { "x-client-id": "{{clientId}}" } }, ); const data = await response.json(); // Example response: // { // "data": [ // { // "collectionAddress": "0x456...", // "tokenId": "1", // "balance": "1" // } // ] // } return data; } ``` #### Using Filters ```typescript // Example: Get events with complex filtering async function getFilteredEvents() { const params = new URLSearchParams({ // Block filters filter_block_number_gte: "{{startBlock}}", filter_block_number_lte: "{{endBlock}}", // Time filters filter_block_timestamp_gte: "{{startTimestamp}}", // Transaction filters filter_from_address: "{{fromAddress}}", filter_value_gte: "{{minValue}}", // 1 ETH // Pagination page: "0", limit: "20", // Sorting sort_by: "block_timestamp", sort_order: "desc", }); const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/events?${params}`, { headers: { "x-client-id": "{{clientId}}" } }, ); return await response.json(); } ``` #### Error Handling ```typescript async function safeApiCall() { try { const response = await fetch( `https://{{chainId}}.insight.thirdweb.com/v1/events`, { headers: { "x-client-id": "{{clientId}}" }, }, ); if (!response.ok) { const errorData = await response.json(); // Example error response: // { "error": "Invalid client ID" } throw new Error(errorData.error); } return await response.json(); } catch (error) { console.error("API Error:", error.message); throw error; } } ``` ### API Reference #### Events API * **Get All Events** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/events ``` or ```typescript GET https://insight.thirdweb.com/v1/events?chainId={{chainId1}}&chainId={{chainId2}} ``` * **Get Contract Events** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/events/:contractAddress ``` * **Get Specific Event Type** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/events/:contractAddress/:signature ``` #### Transactions API * **Get All Transactions** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/transactions ``` * **Get Contract Transactions** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/transactions/:contractAddress ``` * **Get Specific Transaction Type** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/transactions/:contractAddress/:signature ``` #### Token Balance API * **ERC20 Balances** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc20/:ownerAddress interface ERC20Response { data: ERC20Balance[]; } interface ERC20Balance { tokenAddress: string; balance: string; } ``` * **ERC721 & ERC1155 Balances** ```typescript GET https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc721/:ownerAddress GET https://{{chainId}}.insight.thirdweb.com/v1/tokens/erc1155/:ownerAddress interface TokenBalance { data: NFTBalance[]; } interface NFTBalance { collectionAddress: string; tokenId: string; balance: string; } ``` ### Query Parameters #### Common Parameters ```typescript interface CommonQueryParams { page?: number; // Default: 0 limit?: number; // Default: 20, must be > 0 sort_by?: "block_number" | "block_timestamp" | "transaction_index"; sort_order?: "asc" | "desc"; group_by?: string; aggregate?: string[]; } ``` #### Filter Types * **Block Filters** ```typescript interface BlockFilters { filter_block_number?: number; // Example: 1000000 filter_block_number_gte?: number; // Example: 1000000 filter_block_number_gt?: number; // Example: 1000000 filter_block_number_lte?: number; // Example: 1000000 filter_block_number_lt?: number; // Example: 1000000 filter_block_hash?: string; // Example: "0x3a1fba5..." } ``` * **Time Filters** ```typescript interface TimeFilters { filter_block_timestamp?: number; // Example: 1715222400 filter_block_timestamp_gte?: number; // Example: 1715222400 filter_block_timestamp_gt?: number; // Example: 1715222400 filter_block_timestamp_lte?: number; // Example: 1715222400 filter_block_timestamp_lt?: number; // Example: 1715222400 } ``` * **Transaction Filters** ```typescript interface TransactionFilters { filter_transaction_index?: number; filter_transaction_hash?: string; filter_from_address?: string; filter_value?: number; filter_gas_price?: number; filter_gas?: number; // Additional gte, gt, lte, lt variants for numeric fields } ``` ### Error Handling All endpoints return standard error responses for 400 and 500 status codes: ```typescript // 400 Bad Request // 500 Internal Server Error interface ErrorResponse { error: string; // Required } ``` ## Insight Troubleshoot Guide More information coming soon. ## Insight Insight is a tool that lets you retrieve blockchain data from any EVM chain, enrich it with metadata, and transform it using custom logic. Insight Insight is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-dev/insight) ### Features ##### Easy-to-Use API Easily understandable data API to query blockchain data. ##### Managed Infrastructure No need to index blockchains yourself or manage infrastructure and RPC costs. ##### Custom Blueprints Transform and enrich data easily to suit your needs. ##### Lightning-Fast Queries Access any transaction, event or token API data ### Video Tutorials ### Supported Chains Insight is supported on select EVM compatible chains. To view the full list, visit [thirdweb chainlist](https://thirdweb.com/chainlist?service=insight). ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsupported-chains.eca8603d.png&w=3840&q=75) ## Get Started In this guide we will learn how to use the events blueprint in insight. ### Pre-requisites * [Create a project](https://thirdweb.com/team) and navigate to the project settings to get a client ID * Use insight API with the base URL below. * To authenticate use your client ID in the `x-client-id` header or `clientId` query parameter ``` ``` ### Basic Usage ```typescript const getUsdtTransfers = async () => { try { const response = await fetch('https://1.insight.thirdweb.com/v1/events/0xdAC17F958D2ee523a2206206994597C13D831ec7/Transfer(address,address,uint256)?limit=5', { headers: { 'x-client-id': } }); const transfersInfo = await response.json(); return transfersInfo } catch (error) { console.error('Error:', error); } }; ``` Once you execute the query above you will receive a result similar to this: ```json { "meta": { "chain_id": 1, "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "page": 0, "limit": 5, "total_items": 5, "total_pages": 0 }, "data": [ { "chain_id": 1, "block_number": 14705663, "block_hash": "0x8f7014ff29e3ea83ee03354bd968741d01b92d4c3ddf02bfa5121465b8240736", "block_timestamp": 1651594686, "transaction_hash": "0xf5009000b57b761900010bf7f365c12ce34438ac3afdef9778b46055c26353b3", "transaction_index": 193, "log_index": 278, "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "data": "0x0000000000000000000000000000000000000000000000000000000005f5e100", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000b8418cdb539069e075b4c6c6675114879ffd441b", "0x000000000000000000000000515ea78a0ff34aef46a5e323d759935e05de4827" ] }, { "chain_id": 1, "block_number": 14705664, "block_hash": "0x916d67589f2bc37600faf055309fd9f654d0c0030df35d31c04e22fef8d24ff2", "block_timestamp": 1651594701, "transaction_hash": "0x0999f86751fe5b8f2bc5446e38abf3f0e01ee1c7ff5ce6288abbea506ac3cebf", "transaction_index": 41, "log_index": 120, "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "data": "0x0000000000000000000000000000000000000000000000000000000014dc9380", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000005041ed759dd4afc3a72b8192c143f72f4724081a", "0x0000000000000000000000000f69fce36dc680512d836526fc1abb9cd6bdcdd4" ] }, { "chain_id": 1, "block_number": 14705664, "block_hash": "0x916d67589f2bc37600faf055309fd9f654d0c0030df35d31c04e22fef8d24ff2", "block_timestamp": 1651594701, "transaction_hash": "0x0f25b357155dca3186700e69a7586ee0153f1d7d75304a158aab9be210b31a56", "transaction_index": 72, "log_index": 133, "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "data": "0x0000000000000000000000000000000000000000000000000000000643e6c140", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000007b29bee9cb744122edcd7e8223efcdf8d8d8e0a4", "0x0000000000000000000000001724aabcef350d3f3433804e6167d4c4137aab01" ] }, { "chain_id": 1, "block_number": 14705664, "block_hash": "0x916d67589f2bc37600faf055309fd9f654d0c0030df35d31c04e22fef8d24ff2", "block_timestamp": 1651594701, "transaction_hash": "0x10da03bea7828722c92c86704522c7e1ce7dd2947d633ec6c1fb36680cb256e5", "transaction_index": 145, "log_index": 229, "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "data": "0x00000000000000000000000000000000000000000000000000000000163d3a0d", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x00000000000000000000000056eddb7aa87536c09ccc2793473599fd21a8b17f", "0x0000000000000000000000002b38e18192a442ed923addb4739e0a7724945d3c" ] }, { "chain_id": 1, "block_number": 14705664, "block_hash": "0x916d67589f2bc37600faf055309fd9f654d0c0030df35d31c04e22fef8d24ff2", "block_timestamp": 1651594701, "transaction_hash": "0x20967f489b5237c0c6ffcbf7afcd921303e0db9e49382f9dc37809874e674b8b", "transaction_index": 188, "log_index": 295, "address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "data": "0x0000000000000000000000000000000000000000000000000000000011b9e2b6", "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x0000000000000000000000003cd751e6b0078be393132286c442345e5dc49699", "0x0000000000000000000000000e6eeff72188094c78b2478b693bbdbf9b13aaac" ] } ] } ``` ### Multichain Queries Insight also supports querying multiple chains in a single API call. This is useful when you need to retrieve data across different networks without making separate requests. ```typescript const getMultichainTransfers = async () => { try { // Query USDT transfers on Ethereum (1) and Polygon (137) const response = await fetch('https://insight.thirdweb.com/v1/events?chain=1&chain=137&limit=10', { headers: { 'x-client-id': } }); const transfersInfo = await response.json(); return transfersInfo } catch (error) { console.error('Error:', error); } }; ``` When querying multiple chains, the response includes a `chain_ids` array in the metadata and each item in the data array includes its `chain_id`: ```json { "meta": { "chain_ids": [1, 137], "total_items": 10, "limit_per_chain": 5, "page": 0, "limit": 10, "total_pages": 1 }, "data": [ { "chain_id": 1, "block_number": 14705663, // ... other Ethereum event data }, { "chain_id": 137, "block_number": 25631042, // ... other Polygon event data } // ... more events from both chains ] } ``` Key points about multichain queries: * Use the base URL `https://insight.thirdweb.com` instead of the chain-specific subdomain * Add multiple `chain` query parameters (e.g., `chain=1&chain=137`) * The response includes a `chain_ids` array and `limit_per_chain` in the metadata * Each item in the data array includes its `chain_id` for identification For more detailed information and advanced use cases, check out our [Multichain Queries](https://portal.thirdweb.com/insight/multichain-queries) documentation. ## Multichain Queries Insight now supports querying multiple blockchain networks in a single API call. This powerful feature allows you to retrieve and analyze data across different chains without making separate requests for each network. ### Why Use Multichain Queries? * **Efficiency**: Reduce the number of API calls needed to fetch data from multiple chains * **Simplicity**: Consolidate cross-chain data in a single request and response * **Performance**: Minimize latency by avoiding sequential requests to different chains * **Consistency**: Process data from different networks using a unified format ### How to Use Multichain Queries Instead of using the chain-specific subdomain approach, multichain queries use the base URL with multiple `chain` query parameters: ```typescript // Traditional single-chain query (using subdomain) const singleChainUrl = `https://1.insight.thirdweb.com/v1/events`; // Multichain query (using base URL with chain parameters) const multiChainUrl = `https://insight.thirdweb.com/v1/events?chain=1&chain=137`; ``` #### Authentication Authentication works the same way as with single-chain queries: ```typescript // Using client ID in header const headers = { "x-client-id": "{{clientId}}", }; // Or as a query parameter const url = `https://insight.thirdweb.com/v1/events?chain=1&chain=137&clientId={{clientId}}`; ``` ### Response Format Responses for multichain queries include additional metadata to help you identify which data belongs to which chain: ```json { "meta": { "chain_ids": [1, 137], // List of queried chain IDs "total_items": 113, // Total count across all chains "limit_per_chain": 100, // Per-chain limit derived from the request "page": 0, "limit": 200, "total_pages": 1 }, "data": [ { "chain_id": 1, // Each item includes its chain ID "block_number": "17859301", "transaction_hash": "0x123...", // ... other fields }, { "chain_id": 137, "block_number": "48392021", // ... other fields } ] } ``` Key differences in the response format: * The `meta` object includes a `chain_ids` array listing all queried chains * A `limit_per_chain` field indicates how many items were requested per chain * Each item in the `data` array includes a `chain_id` field to identify its network ### Pagination and Limits When using multichain queries, the `limit` parameter applies to each chain individually: ```typescript // This will return up to 20 items from each chain (potentially 40 total items) const url = `https://insight.thirdweb.com/v1/events?chain=1&chain=137&limit=20`; ``` The `limit_per_chain` in the response metadata shows how many items were requested per chain, while the overall `limit` represents the maximum total items across all chains. ### Examples #### Example 1: Query Events Across Multiple Chains ```typescript const getMultichainEvents = async () => { try { // Query events on Ethereum (1) and Polygon (137) const response = await fetch( "https://insight.thirdweb.com/v1/events?chain=1&chain=137&limit=10", { headers: { "x-client-id": "", }, }, ); return await response.json(); } catch (error) { console.error("Error:", error); } }; ``` #### Example 2: Track Token Balances Across Networks ```typescript const getMultichainTokenBalances = async (ownerAddress) => { try { // Get ERC-20 balances on Ethereum, Polygon, and Arbitrum const response = await fetch( `https://insight.thirdweb.com/v1/tokens/erc20/${ownerAddress}?chain=1&chain=137&chain=42161`, { headers: { "x-client-id": "", }, }, ); return await response.json(); } catch (error) { console.error("Error:", error); } }; ``` #### Example 3: Monitor NFT Collections Across Chains ```typescript const getMultichainNFTs = async (ownerAddress) => { try { // Get NFTs on Ethereum and Base const response = await fetch( `https://insight.thirdweb.com/v1/tokens/erc721/${ownerAddress}?chain=1&chain=8453`, { headers: { "x-client-id": "", }, }, ); return await response.json(); } catch (error) { console.error("Error:", error); } }; ``` ### Supported Endpoints All Insight blueprints support multichain queries: * **Events Blueprint**: `/v1/events` \- Returns events from specified chains * **Transactions Blueprint**: `/v1/transactions` \- Provides transactions from multiple chains * **Tokens Blueprint**: * `/v1/tokens/erc20/:ownerAddress` \- Consolidates ERC-20 token balances across chains * `/v1/tokens/erc721/:ownerAddress` \- Consolidates NFT holdings across chains * `/v1/tokens/erc1155/:ownerAddress` \- Consolidates ERC-1155 token balances across chains ### Best Practices * **Limit Chain Count**: While you can query multiple chains, it's best to limit the number of chains in a single request to avoid timeouts. * **Use Appropriate Limits**: Set reasonable `limit` values to control response size and processing time. * **Handle Chain-Specific Errors**: Some chains might return errors while others succeed. Your code should handle partial successes. * **Process Data by Chain**: When analyzing the response, group or filter data by `chain_id` for chain-specific analysis. * **Consider Rate Limits**: Multichain queries count against your rate limits for each chain queried. ### Use Cases #### Cross-Chain Portfolio Tracking Track a user's assets across multiple networks to provide a comprehensive view of their holdings: ```typescript const getPortfolio = async (address) => { // Get ERC-20 tokens across major chains const erc20Response = await fetch( `https://insight.thirdweb.com/v1/tokens/erc20/${address}?chain=1&chain=137&chain=42161&chain=10&chain=8453`, { headers: { "x-client-id": "" } }, ); // Get NFTs across the same chains const nftResponse = await fetch( `https://insight.thirdweb.com/v1/tokens/erc721/${address}?chain=1&chain=137&chain=42161&chain=10&chain=8453`, { headers: { "x-client-id": "" } }, ); return { tokens: await erc20Response.json(), nfts: await nftResponse.json(), }; }; ``` #### Cross-Chain Activity Monitoring Monitor transactions or events across multiple chains for a specific address: ```typescript const getRecentActivity = async (address) => { const response = await fetch( `https://insight.thirdweb.com/v1/transactions?filter_from_address=${address}&chain=1&chain=137&chain=42161&sort_by=block_timestamp&sort_order=desc&limit=10`, { headers: { "x-client-id": "" } }, ); return await response.json(); }; ``` #### Cross-Chain Protocol Analysis Analyze protocol activity across different deployments on multiple chains: ```typescript const getProtocolActivity = async (protocolAddresses) => { // protocolAddresses = { 1: "0x123...", 137: "0x456...", 42161: "0x789..." } const queryParams = Object.entries(protocolAddresses) .map( ([chainId, address]) => `chain=${chainId}&filter_address=${address}`, ) .join("&"); const response = await fetch( `https://insight.thirdweb.com/v1/events?${queryParams}&limit=50`, { headers: { "x-client-id": "" } }, ); return await response.json(); }; ``` ## Insight Use Cases Insight offers versatile use cases for using blockchain data within applications, enabling developers to track and analyze a wide array of on-chain activities. With Insight, you can efficiently monitor transfer events, transactions, token ownership, NFT collections, and staking activities across multiple chains, and more, making it a powerful tool for building dynamic blockchain applications. | Use Case | Blueprint(s) | | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Display in-game assets such as items or tokens (ERC-20, ERC-721, or ERC-1155) tied to the player's wallet. | Use Events Blueprint to fetch transfer events where the player’s wallet is the recipient, showing all NFTs or in-game items acquired by the player. | | Display earned tokens based on achievements or progress rewarded to players in games. | Use Transactions Blueprint to track transactions where the game’s smart contract sends tokens to a player’s wallet. Use Events Blueprint to filter transfer events from the game’s contract to list all tokens awarded to players. | | Analyze token economics such as daily trading volume to understand token liquidity or market activity. | Use the Transactions Blueprint to get transactions involving any token and then aggregate data based on timestamps to calculate 24-hour transaction volumes. | | Analyze gas consumption of different transactions to help minimize gas fees for users by evaluating high-gas transactions or commonly used functions. | Use Transactions Blueprint to summarize gas usage across transactions for specific functions, helping to analyze and optimize protocol functions for efficiency. | | Analyze token ownership to understand community health and investment risks. | Use Events Blueprint to track token transfer events, allowing users to analyze the distribution and concentration of token holders. | | Track the movements of an entire NFT collection. | Use Events Blueprint to capture all transfer events for a specified collection and show ownership history or current trading volume for the collection. | | Fetch all NFTs owned by a specific wallet address. | Use Events Blueprint to fetch transfer events for each NFT contract where the specified wallet address is the recipient. | | Fetch all transactions emitted by a single wallet across multiple chains. | Use Transactions Blueprint to filter transactions by wallet address across different chain\_ids to provide a historical view of cross-chain transactions. | | Fetch all tokens owned by a specific wallet address. | Use Events Blueprint to find transfer events where the wallet address is the recipient, providing a list of token balances. | | Detect wallet staking activity on platforms such as AAVE or other DeFi protocols. | Use Events Blueprint to filter for staking-related events such as deposits, and monitor which wallets are actively staking. | ## Clear Session Clears all messages for a specific session using the session ID. ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Path parameters ##### session\_id Required The unique ID of the session ##### Type `string; ` ### Request POST /session/{session\_id}/clear `fetch("https://nebula-api.thirdweb.com/session/{session_id}/clear", { method: "POST", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 `{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "context": { "chain_ids": [ "1", "137" ], "wallet_address": "0x..." }, "history": [ {} ], "account_id": "string", "model_name": "string", "is_public": true, "memory": [ {} ], "action": [ {} ], "archive_at": "2025-01-08T17:22:45.016Z", "deleted_at": "2025-01-08T17:22:45.016Z", "created_at": "2025-01-08T17:22:45.016Z", "updated_at": "2025-01-08T17:22:45.016Z" } } ` ## Create Session Creates a new session. ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Body ##### title Set a custom title for the session. ##### Type `string; ` ##### context Provide additional context information along with the message ##### Type `{ chainIds: string[] | null; walletAddress: string | null; } ` ### Request POST /session `fetch("https://nebula-api.thirdweb.com/session", { method: "POST", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 422 `{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "context": { "chain_ids": [ "1", "137" ], "wallet_address": "0x..." }, "history": [ {} ], "account_id": "string", "model_name": "string", "is_public": true, "memory": [ {} ], "action": [ {} ], "archive_at": "2025-01-08T17:22:45.016Z", "deleted_at": "2025-01-08T17:22:45.016Z", "created_at": "2025-01-08T17:22:45.016Z", "updated_at": "2025-01-08T17:22:45.016Z" } } ` ## Delete Session Deletes a session by ID ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Path parameters ##### session\_id Required The unique ID of the session ##### Type `string; ` ### Request DELETE /session/{session\_id} `fetch("https://nebula-api.thirdweb.com/session/{session_id}", { method: "DELETE", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 422 `{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "deleted_at": "2025-01-08T19:27:37.296Z" } } ` ## Send Message Process a chat message and return the response ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Body ##### message Required The message to be processed. ##### Type `string; ` ##### stream Whether to stream the response or not ##### Type `boolean; ` ##### session\_id The session ID to associate with the message. If not provided, a new session will be created. ##### Type `string; ` ##### context Provide additional context information along with the message ##### Type `{ chainIds: string[] | null; walletAddress: string | null; } ` ### Request POST /chat `fetch("https://nebula-api.thirdweb.com/chat", { method: "POST", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, body: { message: "Hello", stream: false, session_id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", }, }); ` ### Response 200 401 422 `{ "message": "string", "actions": [ { "session_id": "string", "request_id": "string", "type": "init", "source": "string", "data": "string" } ], "session_id": "string", "request_id": "string" } ` ## Chat Actions Chat actions represent blockchain transactions or operations that Nebula has prepared in response to your request. The response includes both a detailed explanation in the `message` field and the actual transaction data in the `actions` array. **Example Response with Chat Action:** ```json { "message": "The transaction to transfer 0.0001 ETH to the address resolved from the ENS name `vitalik.eth` (which is `0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045`) is set up successfully. The simulation indicates that the transaction is likely to succeed.\n\nPlease proceed by signing and confirming the transaction.", "actions": [ { "session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097", "request_id": "c2b51ed6-da79-49ac-b411-206a42059509", "type": "sign_transaction", "source": "executor", "data": "{\"chainId\": 11155111, \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\"}" } ], "session_id": "437a0df7-d512-4ef4-95b5-6168ccbbe097", "request_id": "c2b51ed6-da79-49ac-b411-206a42059509" } ``` **Action Properties:** * `session_id`: Unique identifier for the current session * `request_id`: Unique identifier for the specific request * `type`: The type of action (e.g., "sign\_transaction") * `source`: Origin of the action (e.g., "executor") * `data`: Transaction parameters including: * `chainId`: Network identifier (e.g., 11155111 for Sepolia) * `to`: Recipient's address * `data`: Transaction data (if any) * `value`: Amount to send in wei When handling actions: * Parse the `message` field for human-readable transaction details * Extract the transaction data from the `actions` array * Present transaction details to the user for review * Use a local wallet to sign the transaction * Broadcast the signed transaction to the network **Example Implementation with thirdweb SDK:** ```javascript import { createThirdwebClient, prepareTransaction, sendTransaction, privateKeyToAccount, } from "thirdweb"; // Example function to handle the API response async function handleNebulaResponse(response) { // Initialize thirdweb client const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY, }); // Initialize account const account = privateKeyToAccount({ client, privateKey: process.env.EOA_PRIVATE_KEY, }); // Check if we have any actions if (response.actions && response.actions.length > 0) { const action = response.actions[0]; // Parse the transaction data from the action const txData = JSON.parse(action.data); try { // Prepare transaction with client const transaction = prepareTransaction({ to: txData.to, data: txData.data, value: BigInt(txData.value), chain: txData.chainId, client, }); // Send transaction with account const result = await sendTransaction({ transaction, account, }); return result; } catch (error) { console.error("Error processing transaction:", error); throw error; } } } // Example usage const response = await fetch("https://nebula-api.thirdweb.com/chat", { method: "POST", headers: { "Content-Type": "application/json", "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, body: JSON.stringify({ message: "send 0.0001 ETH on sepolia to vitalik.eth", execute_config: { mode: "client", signer_wallet_address: "0xc3F2b2a12Eba0f5989cD75B2964E31D56603a2cE", }, }), }); const data = await response.json(); const result = await handleNebulaResponse(data); ``` ## Execute Action Executes a specified action. It is similar to /chat but it only handles transaction requests. It is designed to be used without history context. ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Body ##### message Required The message to be processed. ##### Type `string; ` ##### stream Whether to stream the response or not ##### Type `boolean; ` ##### session\_id The session ID to associate with the message. If not provided, a new session will be created. ##### Type `string; ` ##### context Provide additional context information along with the message ##### Type `{ chainIds: string[] | null; walletAddress: string | null; } ` ### Request POST /execute `fetch("https://nebula-api.thirdweb.com/execute", { method: "POST", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, body: { message: "Hello", stream: false, session_id: "3fa85f64-5717-4562-b3fc-2c963f66afa6", }, }); ` ### Response 200 401 422 `{ "message": "string", "actions": [ { "session_id": "string", "request_id": "string", "type": "init", "source": "string", "data": "string" } ], "session_id": "string", "request_id": "string" } ` ## Get Session Get details of a session by ID ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Path parameters ##### session\_id Required The unique ID of the session ##### Type `string; ` ### Request GET /session/{session\_id} `fetch("https://nebula-api.thirdweb.com/session/{session_id}", { method: "GET", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 422 `{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "context": { "chain_ids": [ "1", "137" ], "wallet_address": "0x..." }, "history": [ {} ], "account_id": "string", "model_name": "string", "is_public": true, "memory": [ {} ], "action": [ {} ], "archive_at": "2025-01-08T17:22:45.016Z", "deleted_at": "2025-01-08T17:22:45.016Z", "created_at": "2025-01-08T17:22:45.016Z", "updated_at": "2025-01-08T17:22:45.016Z" } } ` ## Update Session Update session details like title, context, etc. ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Path parameters ##### session\_id Required The unique ID of the session ##### Type `string; ` ### Body ##### title Set a custom title for the session. ##### Type `string; ` ##### context Provide additional context information along with the message ##### Type `{ chainIds: string[] | null; walletAddress: string | null; } ` ### Request PUT /session/{session\_id} `fetch("https://nebula-api.thirdweb.com/session/{session_id}", { method: "PUT", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 422 `{ "result": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "context": { "chain_ids": [ "1", "137" ], "wallet_address": "0x..." }, "history": [ {} ], "account_id": "string", "model_name": "string", "is_public": true, "memory": [ {} ], "action": [ {} ], "archive_at": "2025-01-08T17:22:45.016Z", "deleted_at": "2025-01-08T17:22:45.016Z", "created_at": "2025-01-08T17:22:45.016Z", "updated_at": "2025-01-08T17:22:45.016Z" } } ` ## IThirdwebWallet.SwitchNetwork This method allows setting the active chain of the wallet if applicable. When using Smart Wallets, make sure any overrides to default contracts, such as factories, are deployed on all chains you intend to switch to. We also support switching between zksync and non-zksync chains. ### Usage ```csharp await wallet.SwitchNetwork(chainId); ``` ##### Parameters #### chainId (required) The chain ID to which you want to switch the wallet. ## List Sessions Fetches a list of all available sessions. ### Headers ##### x-secret-key Required Your thirdweb secret key for authentication. ##### Type `string; ` ### Request GET /session/list `fetch("https://nebula-api.thirdweb.com/session/list", { method: "GET", headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); ` ### Response 200 401 `{ "result": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "title": "string", "created_at": "2025-01-08T10:52:40.293Z", "updated_at": "2025-01-08T10:52:40.293Z" } ] } ` ## Nebula API Reference Nebula provides a conversational interface to interact with blockchain data and services, and access to thirdweb tools. ### Base URL All API requests should be made to: ```bash https://nebula-api.thirdweb.com ``` ### Authentication All API endpoints require authentication using the thirdweb secret key. [Learn how to obtain a secret key.](https://portal.thirdweb.com/nebula/get-started). Include this key in your request headers: ```bash x-secret-key: YOUR_THIRDWEB_SECRET_KEY ``` Example curl with authentication: ```bash curl -X POST https://nebula-api.thirdweb.com/chat \ -H "Content-Type: application/json" \ -H "x-secret-key: YOUR_THIRDWEB_SECRET_KEY" \ -d '{ "message": "send 0.0001 ETH on sepolia to vitalik.eth", "user_id": "default-user", "stream": false, }' ``` ## Nebula FAQs ##### I am still waiting on access to Nebula. How can I be approved? We are rolling out Nebula approval in batches daily - stay tuned! ##### What underlying model does Nebula use? During Alpha, we are primarily testing the t0 model while conducting limited trials of the upcoming t1 model. The t0 model utilizes a mixture-of-agents architecture. We are targeting an early Q2 launch for t1, and will provide additional details around launch. ##### Does Nebula support \_\_\_\_\_\_\_\_ chain? Nebula supports reading and writing capabilities on any EVM-compatible chain. [View the chainlist](https://thirdweb.com/chainlist) for all supported chains. ##### Does Nebula support multiple languages? Yes, you may ask Nebula questions in any spoken language. ##### How can I improve upon Nebula's responses? We recommend using [context filters](https://portal.thirdweb.com/nebula/key-concepts/context-filters) to improve relevant responses. You may also modify hyperparameters such as temperature, top-p, and more using the OpenAI API. Learn more about our [OpenAI API integration](https://portal.thirdweb.com/nebula/plugins/openai). ##### Which contracts does Nebula support? Nebula supports the read and write context of any verified contract or any contract on the thirdweb dashboard. For deploying through Nebula, supported contracts include [Token - ERC20](https://thirdweb.com/thirdweb.eth/TokenERC20),[NFT Collection - ERC721](https://thirdweb.com/thirdweb.eth/TokenERC721), [Edition - ERC1155](https://thirdweb.com/thirdweb.eth/TokenERC1155), and [Split](https://thirdweb.com/thirdweb.eth/Split) contracts. If you have a published contract you would like to enable for deployment through Nebula, please [contact us](https://thirdweb.com/contact-us). ##### Does Nebula have memory from past conversations? Nebula retains memory within the confines of a session. [Learn more about sessions](https://portal.thirdweb.com/nebula/key-concepts/sessions). ##### What is the context size of Nebula? The context size or window is 128k tokens or approximately 96,000 words which may vary depending on the specific language and text characteristics. ##### Will Nebula be open source? Nebula is not currently open source. We are exploring open sourcing Nebula in the future. ##### When will pricing be available for Nebula? Pricing options will be available in beta. Nebula is still being tested in alpha. ## Chat & Execute endpoints The `/chat` endpoint is used for **natural language interactions** with the AI. It allows users to ask questions, get explanations, or retrieve blockchain-related insights, and execute transactions. The `/execute` endpoint is used for **triggering actual blockchain transactions** through AI-generated execution logic. This endpoint **performs actions** on-chain and is designed to be used without historical context. ## Context Filters Context filters help control what blockchain data the AI uses to generate responses. You can specify: * Chain IDs – Choose which blockchain networks to pull data from. * Wallet Address – Focus on a specific wallet’s transactions, balances, and interactions. Benefits: * **More relevant answers:** AI focuses only on the data you care about. * **Enable Scope**: Keep results relevant to networks and wallets specified. Example, ```jsx { "context": { "chain_ids": ["1"], // Ethereum network "wallet_address": "0x123...abc" // Specific wallet to analyze } } ``` ## Execute Configuration Configure transaction execution behavior using the execute config: ```json { "execute_config": { "mode": "client", "signer_wallet_address": "0x..." } } ``` Parameters: * `mode`: Execution mode (currently supports "client") * `signer_wallet_address`: Wallet address for transaction signing When mode is "client", Nebula returns an unsigned transaction for local wallet signing. ## Get Started Learn how to get set up and started with the Nebula API to successfully prepare and enable a connected user to sign a transfer . ### Prerequisites Before you begin, ensure you have the following: * A thirdweb account * A blockchain wallet for executing transactions * Node.js and npm or yarn installed on your system ### Obtain Client ID & Secret Key * #### Create project Navigate to the [projects dashboard](https://thirdweb.com/) and create a new project. ![Create a new project](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnew-project.d97ef6dc.png&w=3840&q=75) * #### Obtain keys Setup your project and obtain your client ID and secret key. Please note your secret key somewhere safe as it is not recoverable. #### Client Id vs Secret Key Client Id is used for client side usage and is restricted by the domain restrictions you set on your API key, it is a public identifier which can be used on the frontend safely. Secret key is used for server side or script usage and is not restricted by the domain restrictions. Never expose your secret key in client side code. ![Obtain keys](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fkeys.9eb13732.png&w=3840&q=75) ### Setup API (TypeScript SDK) * #### Install SDK Install the TypeScript SDK ```bash npm install thirdweb ``` * #### Environment Variables Setup environmental variables. #### Storing Secret Keys Ensure you keep your secret key safe and do not expose it in your codebase. We recommend using a secret key manager such as [AWS Secret Manager](https://aws.amazon.com/secrets-manager/) or [Google Secret Manager](https://cloud.google.com/secret-manager). ```jsx THIRDWEB_SECRET_KEY = your_thirdweb_secret_key; ``` * #### Import Libraries Import required libraries from thirdweb. ```jsx import { createThirdwebClient, prepareTransaction, sendTransaction, privateKeyToAccount, } from "thirdweb"; ``` * #### Create Function to Handle Response This function processes the API's response and executes blockchain transactions. ```jsx import { generateAccount } from "thirdweb/wallets"; async function handleNebulaResponse(response) { const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY, }); // You can use any wallet- see https://portal.thirdweb.com/typescript/v5/supported-wallets const account = await generateAccount({ client }); if (response.actions && response.actions.length > 0) { const action = response.actions[0]; const txData = JSON.parse(action.data); try { const transaction = prepareTransaction({ to: txData.to, data: txData.data, value: BigInt(txData.value), chain: txData.chainId, client, }); const result = await sendTransaction({ transaction, account, }); console.log("Transaction Successful:", result); return result; } catch (error) { console.error("Error executing transaction:", error); throw error; } } } ``` * #### Call Nebula API Send a request to the Nebula API to interpret your natural language command and retrieve the transaction details. ```jsx const response = await fetch("https://nebula-api.thirdweb.com/chat", { method: "POST", headers: { "Content-Type": "application/json", "x-secret-key": process.env.THIRDWEB_SECRET_KEY, }, body: JSON.stringify({ message: "send 0.001 ETH on Sepolia to vitalik.eth", execute_config: { mode: "client", signer_wallet_address: "0xYourWalletAddress", }, }), }); const data = await response.json(); await handleNebulaResponse(data); ``` * #### Example Response The response from the API will contain the transaction details. ```jsx Transaction Successful: { transactionHash: "0x123abc...", blockNumber: 1234567, ... } ``` Congratulations! You have successfully set up the Nebula API and executed a transaction using the thirdweb SDK. #### Additional Resources * [Nebula API Documentation](https://portal.thirdweb.com/nebula/api-reference) * [thirdweb SDK Documentation](https://portal.thirdweb.com/typescript/v5) ## Sessions Sessions are a way to maintain context across multiple interactions with a user. Since LLMs are stateless by default, sessions help simulate continuity. * Sessions are created automatically when calling `/chat` without a `session_id` or can be created explicitly by calling the `/session` endpoint. * Sessions can be managed through the following endpoints: * [Create Session](https://portal.thirdweb.com/api-reference/create-session) * [Get Session](https://portal.thirdweb.com/api-reference/get-session) * [Clear Session](https://portal.thirdweb.com/api-reference/clear-session) * [Update Session](https://portal.thirdweb.com/api-reference/update-session) * [Delete Session](https://portal.thirdweb.com/api-reference/delete-session) * [List Sessions](https://portal.thirdweb.com/api-reference/list-sessions) * Sessions persist your conversation history, custom configurations for blockchain data, and thirdweb tools interactions. ## Eliza Eliza is a simple, fast, and lightweight AI agent framework to build flexible, scalable, and secure conversational agents. With the thirdweb plugin, you can easily integrate Nebula into an AI agent built with Eliza to provide increasingly accurate read, write, and reasoning capabilities to blockchain-related prompts: Nebula Plugin Nebula Plugin is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/elizaOS/eliza/tree/main/packages/plugin-thirdweb) ### Prerequisites * Create a thirdweb account * Node.js 23+ and pnpm 9+ installed ### Obtain Client ID & Secret Key * #### Create project Navigate to the [projects dashboard](https://thirdweb.com/) and create a new project. ![Create a new project](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnew-project.d97ef6dc.png&w=3840&q=75) * #### Obtain keys Setup your project and obtain your client ID and secret key. Please note your secret key somewhere safe as it is not recoverable. #### Client Id vs Secret Key Client Id is used for client side usage and is restricted by the domain restrictions you set on your API key, it is a public identifier which can be used on the frontend safely. Secret key is used for server side or script usage and is not restricted by the domain restrictions. Never expose your secret key in client side code. ![Obtain keys](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fkeys.9eb13732.png&w=3840&q=75) ### Setup Eliza Starter If you have not created a project with Eliza, it is recommended to start with the Eliza Starter repository: * #### Clone Starter #### Version The Nebula plugin is only available on version 0.1.8 of Eliza and above and is available by default. Clone the starter repository ```bash git clone https://github.com/elizaos/eliza-starter.git ``` * #### Environment Variables Create a .env file and add your secret key and any other environmental variables: ```bash THIRDWEB_SECRET_KEY=your_secret_key ``` #### Client Id vs Secret Key Client Id is used for client side usage and is restricted by the domain restrictions you set on your API key, it is a public identifier which can be used on the frontend safely. Secret key is used for server side or script usage and is not restricted by the domain restrictions. Never expose your secret key in client side code. * #### Install Dependencies ```bash pnpm i ``` * #### Start Eliza ```bash pnpm start ``` #### Additional Resources * [Eliza Documentation](https://elizaos.github.io/eliza/) ## Response Handling ### Streamed vs non-streamed responses * **Streaming Responses**: This method streams data in real-time, providing immediate feedback as the response is generated. Set the `stream` parameter to `true` in your request, the API delivers responses via Server-Sent Events (SSE). * **Non-Streaming Responses**: When the `stream` parameter is set to `false`, the API returns the complete response in a single JSON payload after processing is complete. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fstreamed-response.b945a71f.png&w=3840&q=75) For `stream:true`, you'll need to handle the following event types: * `init`: Initializes the stream and provides session information * `presence`: Provides backend status updates about worker processing * `action`: Contains blockchain transaction or action data * `delta`: Contains chunks of the response message text * `error`: Contains error information if something goes wrong **Example SSE Stream:** ```jsx event: init data: { "session_id": "f4b45429-9570-4ee8-8c8f-8b267429915a", "request_id": "9efc7f6a-8576-4d9c-8603-f6c72aa72164", "type": "init", "source": "user", "data": "" } event: presence data: { "session_id": "f4b45429-9570-4ee8-8c8f-8b267429915a", "request_id": "9efc7f6a-8576-4d9c-8603-f6c72aa72164", "type": "presence", "source": "executor", "data": "Performing function execution: ExecuteNativeTransferClientSigning" } event: action data: { "session_id": "f4b45429-9570-4ee8-8c8f-8b267429915a", "request_id": "9efc7f6a-8576-4d9c-8603-f6c72aa72164", "type": "sign_transaction", "source": "executor", "data": "{\"chainId\": 11155111, \"to\": \"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\", \"data\": \"0x\", \"value\": \"0x5af3107a4000\"}" } event: delta data: {"v": "To send 0.0001 ETH on the Sepolia network"} event: delta data: {"v": " to the address associated with"} ``` **JavaScript Example for handling streams:** ```jsx const eventSource = new EventSource("/chat", { headers: { "x-secret-key": "YOUR_THIRDWEB_SECRET_KEY", }, }); let messageText = ""; eventSource.addEventListener("init", (event) => { const data = JSON.parse(event.data); console.log("Stream initialized:", data); }); eventSource.addEventListener("presence", (event) => { const data = JSON.parse(event.data); console.log("Backend status:", data.data); }); eventSource.addEventListener("action", (event) => { const data = JSON.parse(event.data); console.log("Received action:", data); if (data.type === "sign_transaction") { // Handle transaction signing handleTransaction(data); } }); eventSource.addEventListener("delta", (event) => { const data = JSON.parse(event.data); messageText += data.v; console.log("Current message:", messageText); }); eventSource.addEventListener("error", (event) => { const error = JSON.parse(event.data); console.error("Error:", error); eventSource.close(); }); ``` ### Response Format By default, responses are returned as JSON Objects. You may optionally specify the desired response format using the `response_format` parameter. * **JSON Object**: To receive the response as a JSON object, set `response_format` to `{ "type": "json_object" }`. * **JSON Schema**: For responses adhering to a specific JSON schema, set `response_format` to `{ "type": "json_schema", "json_schema": { ... } }`, where you define the desired schema structure. Example with `json_schema` format, ```jsx curl -X POST https://nebula-api.thirdweb.com/chat \ -H "Content-Type: application/json" \ -H "x-secret-key: ...." \ -d '{ "message": "what is the balance of eimanabdel.eth on contract 0xddC761FEb956Caf62dfa1c8b42e9f33Df424715A on sepolia", "stream": false, "response_format": { "type": "json_schema", "json_schema": { "type": "object", "properties": { "ens_name": { "type": "string", "description": "The ENS name being queried" }, "balance": { "type": "integer", "description": "The balance of the address on the specified contract" } }, "required": ["ens_name", "balance"] } } }' ``` ## OpenAI #### Chat Completions API Compatible with OpenAI’s Chat Completion API to process chat history and generate context-aware responses. ```python from openai import OpenAI client = OpenAI( base_url="https://nebula-api.thirdweb.com", api_key="{{THIRDWEB_SECRET_KEY}}", ) chat_completion = client.chat.completions.create( model="t0", messages=[{"role": "user", "content": "Hello Nebula!"}], stream=False, extra_body={ "context": { "wallet_address": "0x..." }} ) print(chat_completion) ``` #### Models API Compatible with OpenAI’s Models API to list out models used. ```python from openai import OpenAI # https://nebula-api.thirdweb.com/models client = OpenAI( base_url="https://nebula-api.thirdweb.com/", api_key="", ) models = client.models.list() print(models) ``` ## Nebula Troubleshoot Guide For any issues you encounter while using Nebula, please [visit our support site](https://thirdweb.com/support). ## Plugins * [OpenAI](https://portal.thirdweb.com/nebula/plugins/openai) * [Eliza](https://portal.thirdweb.com/nebula/plugins/eliza) We are actively adding more integrations, for any specific requests please [contact us](https://thirdweb.com/contact). ## Prompt Guide Maximize the potential of Nebula. Whether you’re new to blockchain development or an experienced user, this document will help you craft prompts that fully leverage Nebula’s blockchain specific features. #### Supported Actions | **Action** | **Description** | **Examples** | | ----------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Bridge & Swap** | Bridge and swap native currencies | • "Swap 1 USDC to 1 USDT on the Ethereum Mainnet"• "Bridge 0.5 ETH from Ethereum Mainnet to Polygon" | | **Transfer** | Send native and ERC-20 currencies | • "Send 0.1 ETH to vitalik.eth"• "Transfer 1 USDC to saminacodes.eth on Base" | | **Deploy** | Deploy published contracts | • "Deploy a Token ERC20 Contract"• "Deploy a Split contract with two recipients."• "Deploy an ERC1155 Contract named 'Hello World' with description 'Hello badges on Ethereum'" | | **Understand** | Retrieve information about smart contracts. | • "What ERC standards are implemented by contract address 0x59325733eb952a92e069C87F0A6168b29E80627f on Ethereum?"• "What functions can I use to mint more of my contract's NFTs?"• "What is the total supply of NFTs for my contract?" | | **Interact** | Query wallet balances, addresses, and token holdings. | • "How much ETH is in my wallet?"• "What is the wallet address of vitalik.eth?"• "Does my wallet hold USDC on Base?" | | **Explore** | Access blockchain-specific data. | • "What is the last block on zkSync?"• "What is the current gas price on Avalanche C-Chain?"• "Can you show me transaction details for 0xdfc450bb39e44bd37c22e0bfd0e5212edbea571e4e534d87b5cbbf06f10b9e04 on Optimism?" | | **Research** | Obtain details about tokens, their addresses, and current prices. | • "What is the address of USDC on Ethereum?"• "Is there a UNI token on Arbitrum?"• "What is the current price of ARB?" | | **Build** | Implement features using Web3 SDKs and tools. | • "How can I add a connect wallet button to my web app? I want to support users connecting with both email/social wallets and MetaMask and use smart wallets."• "Can you show me how to claim an NFT from an ERC721 using TypeScript?"• "I have an ERC1155 contract from thirdweb. Can you show me how to generate and mint with a signature?" | ## Nebula Nebula is a natural language model with improved blockchain reasoning, autonomous transaction capabilities, and real-time access to the blockchain. [Learn more about Nebula.](https://blog.thirdweb.com/introducing-nebula-a-powerful-blockchain-model-to-read-write-and-reason-onchain/) Nebula is currently available in Alpha. [Join the waitlist.](https://thirdweb.com/nebula) ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fnebula-diagram.a48e0dc2.png&w=3840&q=75) ### Features ##### Proprietary Blockchain Model Trained on every EVM network and 1M+ contracts ##### Execute Transactions Deploy contracts, send transactions, and more with natural language ##### Wallet Integration Connect with over 500+ EOAs, in-app wallets, and smart wallets with session keys ##### Framework Integration Integrate with popular AI orchestration frameworks ### Video Tutorials ### Templates [GitHubBouncer Eliza Agent](https://github.com/thirdweb-example/bouncer-eliza-agent)[GitHubBlock Explorer](https://github.com/thirdweb-example/nebula-block-explorer)[GitHubERC-20 Token Deployer](https://github.com/thirdweb-example/erc20-token-deployer) ### Supported Chains Nebula is supported on every EVM compatible chain. To view the full list, visit [thirdweb chainlist](https://thirdweb.com/chainlist?service=nebula). ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsupported-chains.eca8603d.png&w=3840&q=75) ## Batching transactions Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful. ```tsx import { useActiveAccount, useSendBatchTransaction, } from "thirdweb/react"; import { approve, transferFrom } from "thirdweb/extensions/erc20"; const smartAccount = useActiveAccount(); const { mutate: sendBatchTransaction } = useSendBatchTransaction(); const approveAndTransfer = async () => { const transactions = [ approve({ contract, spender: "0x...", value: 100, }), transferFrom({ contract, from: "0x...", to: "0x...", amount: 100, }), ]; await sendBatchTransaction(transactions); }; ``` ## Build your own UI You can also use the connection hooks and functions to connect to your smart accounts and build your fully custom UI. * #### Get a free API key You will require an API key to use thirdweb's infrastructure services such as the bundler and paymaster. Obtain an API key from the [thirdweb dashboard Settings page](https://thirdweb.com/create-api-key). The API key lets you access thirdweb's bundler and paymaster infrastructure, which is required for smart accounts to operate and optionally enable [gasless transactions](https://portal.thirdweb.com/glossary/gasless-transactions). Learn more about creating an API key and restricting which contracts the smart account can interact with [here](https://portal.thirdweb.com/api-keys). * #### Connect smart accounts in your application Using `useConnect`, you can pass the `accountAbstraction` prop to automatically convert any connected wallet to a smart account. The connected wallet will be the admin wallet of the smart account. #### Sponsored transactions To set up sponsored transactions, set the `sponsorGas` option to `true` in the smart account configuration. All transactions performed with the smart account will then be sponsored by your application. Testnet transactions are free, but you need a valid credit card on file for mainnet transactions. ```tsx import { useConnect } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; function App() { // 1. set the `accountAbstraction` configuration const { connect } = useConnect({ client, accountAbstraction: { chain: sepolia, // the chain where your smart accounts will be or is deployed sponsorGas: true, // enable or disable sponsored transactions }, }); const connectToSmartAccount = async () => { // 2. connect with the admin wallet of the smart account connect(async () => { const wallet = inAppWallet(); // or any other wallet await wallet.connect({ client, chain: sepolia, strategy: "google", }); return wallet; }); }; return ( ); } ``` * #### Executing Transactions with Smart Accounts Once setup, you can use the Connect [TypeScript](https://portal.thirdweb.com/typescript/v5), [React](https://portal.thirdweb.com/react/v5), or [React Native](https://portal.thirdweb.com/react-native/v5) SDKs to deploy contracts, perform transactions, and manipulate smart accounts like any other wallet. ```tsx import { getContract } from "thirdweb"; import { useActiveAccount, useSendTransaction } from "thirdweb/react"; import { claimTo, balanceOf } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x..." }); // The ThirdwebProvider setup above already handles the connection to the smart account // Within the provider, you can use the SDK normally to interact with the blockchain export default function MyComponent() { // Get the connected smart account const smartAccount = useActiveAccount(); // Example read const { data, isLoading } = useReadContract( balanceOf, { contract, owner: smartAccount.address, }, { enabled: !!smartAccount, }, ); // Example write const { mutate: sendTransaction, isPending } = useSendTransaction(); const mint = () => { sendTransaction({ transaction: claimTo({ contract, to: smartAccount.address, quantity: 1n, }), }); }; // Mint a new NFT return ; } ``` #### Demos Learn by example with these open-source demos: Account Abstraction Demos A reference implementation to create and interact with smart accounts. [GitHubView on GitHub](https://github.com/thirdweb-example/account-abstraction) ## ERC-4337 Smart Accounts Convert any wallet to a ERC-4337 smart account to your application. * Let users **connect to their smart account** using any personal wallet, including in-app wallets for easy onboarding. * Automatically **deploy individual account contracts** for your users when they do their first onchain transaction. * **Sponsor gas costs for all transactions** via the thirdweb paymaster. #### Sponsored transactions To set up sponsored transactions, set the `sponsorGas` option to `true` in the smart account configuration. All transactions performed with the smart account will then be sponsored by your application. Testnet transactions are free, but you need a valid credit card on file for mainnet transactions. ### Live Playground Try out in-app wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/account-abstraction/connect) ### Usage with Connect UI components The easiest way to get started with account abstraction is to use the [ConnectButton](https://portal.thirdweb.com/connect/sign-in/ConnectButton) component. Simply add the `accountAbstraction` property with the desired chain and whether to sponsor gas for your users. With this property, all connected wallets will be automatically converted to smart accounts. The connected wallet will be the admin wallet of the smart account. ```tsx import { createThirdwebClient } from "thirdweb"; import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID", }); export default function App() { return ( ); } ``` You can also make it so _only_ in-app wallets get converted to smart accounts, by configuring the in-app wallet individually. Other external wallets will not be converted to smart accounts with this setup. ```tsx import { createThirdwebClient } from "thirdweb"; import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID", }); const wallets = [ inAppWallet({ // only configure smart accounts for in-app wallets smartAccount: { chain: sepolia, sponsorGas: true, }, }), // other external wallets will not become smart accounts createWallet("io.metamask"), createWallet("rainbow.me"), ]; export default function App() { return ( ); } ``` ### Usage with your own UI You can also use the connection hooks and functions to connect to your smart accounts and build your fully custom UI. ```tsx import { useConnect } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; function App() { // 1. set the `accountAbstraction` configuration to convert wallets to smart accounts const { connect } = useConnect({ client, accountAbstraction: { chain: sepolia, // the chain where your smart accounts will be or is deployed sponsorGas: true, // enable or disable sponsored transactions }, }); const connectToSmartAccount = async () => { // 2. connect with the admin wallet of the smart account connect(async () => { const wallet = inAppWallet(); // or any other wallet await wallet.connect({ client, chain: sepolia, strategy: "google", }); return wallet; }); }; return ( ); } ``` #### Auto connection of smart accounts When building your own UI, remember to also pass the `accountAbstraction` prop to `useAutoConnect` to always reconnect to the smart account on page reload. Refer to the [Smart Wallet API reference](https://portal.thirdweb.com/references/typescript/v5/smartWallet) for more advanced configuration of your smart accounts. ## Adapters The thirdweb SDK can work side by side with: * wagmi * viem * privy * ethers.js v5 * ethers.js v6 * older versions of the @thirdweb-dev/sdk (using the ethers.js v5 adapter) * any other library that conforms to the [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) standard Adapters allow you to use contracts, providers and wallets from these libraries with the thirdweb SDK and vice versa. ### Wagmi #### Using thirdweb in-app wallets with wagmi View the demo repo for using thirdweb in-app / smart wallets with wagmi: [GitHubwagmi + thirdweb demo repo](https://github.com/thirdweb-example/wagmi-inapp-smart-wallets) You can use thirdweb's in-app, ecosystem and smart wallets in your wagmi application by using the `@thirdweb-dev/wagmi-adapter` package. ```bash npm install thirdweb @thirdweb-dev/wagmi-adapter ``` Make sure you're running wagmi 2.14.1 or above. You probably already have a wagmi config with some connectors, simply add the inAppWalletConnector to the list, along with the desired options. ```ts import { http, createConfig } from "wagmi"; import { inAppWalletConnector } from "@thirdweb-dev/wagmi-adapter"; import { createThirdwebClient, defineChain as thirdwebChain, } from "thirdweb"; const client = createThirdwebClient({ clientId: "your-client-id", }); export const config = createConfig({ chains: [sepolia], connectors: [ // add the in-app wallet connector inAppWalletConnector({ client, // optional: turn on smart accounts! smartAccounts: { sponsorGas: true, chain: thirdwebChain(sepolia), }, }), ], transports: { [sepolia.id]: http(), }, }); ``` Then in your application, you can use the connector to trigger the in-app wallet connection. ```ts const { connect, connectors } = useConnect(); const onClick = () => { // grab the connector const inAppWallet = connectors.find( (x) => x.id === "in-app-wallet", ); // call connect with the desired strategy connect({ connector: inAppWallet, strategy: "google", }); }; ``` #### Converting a wagmi wallet client to a thirdweb wallet You can use the thirdweb SDK within a wagmi application by setting the wagmi connected account as the thirdweb 'active wallet'. After that, you can use all of the react components and hooks normally, including `PayEmbed`, `TransactionButton`, etc. ```ts // Assumes you've wrapped your application in a `` import { useEffect } from "react"; import { defineChain } from "thirdweb"; import { useSetActiveWallet } from "thirdweb/react"; import { createWalletAdapter } from "thirdweb/wallets"; import { useDisconnect, useSwitchChain, useWalletClient, } from "wagmi"; import { viemAdapter } from "thirdweb/adapters/viem"; import { client } from "./client"; const account = useAccount(); // from wagmi const setActiveWallet = useSetActiveWallet(); // from thirdweb/react // whenever the wagmi account changes, // we adapt it to a thirdweb wallet and set it as the active wallet useEffect(() => { const setActive = async () => { if (account?.connector?.getProvider) { const provider = await account?.connector?.getProvider({ chainId, }); const thirdwebWallet = EIP1193.fromProvider({ provider, }); await thirdwebWallet.connect({ client, }); setActiveWallet(thirdwebWallet); } }; setActive(); }, [account?.connector?.getProvider, setActiveWallet]); ``` You can view a fully functioning wagmi + thirdweb app in this [github repository](https://github.com/thirdweb-example/wagmi-thirdweb). ### Privy Similarly, you can use the thirdweb SDK with privy by setting the privy wallet as the thirdweb 'active wallet'. After that, you can use all of the react components, functions and hooks normally, including `PayEmbed`, `TransactionButton`, etc. ```ts // Assumes you've wrapped your application in a `` import { useEffect } from "react"; import { defineChain } from "thirdweb"; import { useSetActiveWallet } from "thirdweb/react"; import { createWalletAdapter } from "thirdweb/wallets"; import { ethers5Adapter } from "thirdweb/adapters/ethers5"; import { client } from "./client"; import { useWallets } from "@privy-io/react-auth"; const { wallets } = useWallets(); // from privy const setActiveWallet = useSetActiveWallet(); // from thirdweb/react // whenever the privy wallet changes, // we adapt it to a thirdweb account and set it as the active wallet useEffect(() => { const setActive = async () => { const privyWallet = wallets[0]; if (privyWallet) { const ethersProvider = await privyWallet.getEthersProvider(); // create a thirdweb wallet with the privy provider const thirdwebWallet = EIP1193.fromProvider({ provider: ethersProvider, }); await thirdwebWallet.connect({ client, }); setActiveWallet(thirdwebWallet); } }; setActive(); }, [wallets]); ``` ## Account Permissions & Session Keys A [smart account](https://portal.thirdweb.com/react/v5/account-abstraction/get-started) can have two types of actors: _Session Keys_ and _Admins_. ### Admins Admins have **unrestricted access** to the account; call any functions on the contract, use the contract without going through the ERC-4337 infrastructure (bundlers, EntryPoint, etc.), withdraw the account's native token balance, and so on. #### Assigning Admin Permissions Existing admins on the account can add new admins, remove existing admins or renounce their own admin status. ```tsx import { addAdmin } from "thirdweb/extensions/erc4337"; import { useSendTransaction, useActiveAccount } from "thirdweb/react"; import { getContract } from "thirdweb"; const { mutate: sendTransaction } = useSendTransaction(); const smartAccount = useActiveAccount(); const onClick = () => { if (!smartAccount) return; const transaction = addAdmin({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, adminAddress: "0x...", // the address of the new admin }); sendTransaction(transaction); }; ``` Check out the [API reference](https://portal.thirdweb.com/references/typescript/v5/erc4337/addAdmin) function for more information. ### Session Keys Session Keys are additional authorized signers that must go through ERC-4337 infrastructure (bundlers, EntryPoint, etc.) to use an account to execute transactions. Session keys can use an account under certain restrictions. #### Assigning Session Key Permissions Each individual session key has its own permissions to use the account. Only admins can set the permissions for session keys. Session keys can be assigned the following permissions: * \[Required\] Allow interaction with specific contracts with the account ("\*" for any contracts) * \[Optional\] Have a maximum amount of native tokens that can be transferred per transaction (defaults to 0 eth, transactions with value will be rejected) * \[Optional\] Have access to the account only during a specific time window (defaults to 10 years from now) ```tsx import { addSessionKey } from "thirdweb/extensions/erc4337"; import { useSendTransaction, useActiveAccount } from "thirdweb/react"; import { getContract } from "thirdweb"; const { mutate: sendTransaction } = useSendTransaction(); const smartAccount = useActiveAccount(); const onClick = () => { if (!smartAccount) return; const transaction = addSessionKey({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, sessionKeyAddress: "0x...", // the address of the new session key permissions: { approvedTargets: "*", // the addresses of allowed contracts, or '*' for any contract nativeTokenLimitPerTransaction: 0.1, // the maximum amount of native token (in ETH) that the session key can spend per transaction permissionStartTimestamp: new Date(), // the date when the session key becomes active permissionEndTimestamp: new Date( Date.now() + 24 * 60 * 60 * 1000, ), // the date when the session key expires }, }); sendTransaction(transaction); }; ``` Check out the [API reference](https://portal.thirdweb.com/references/typescript/v5/erc4337/addSessionKey) for more information. ## Sign in with Ethereum Authenticate users with your backend securely by proving they own a given Ethereum address. SIWE (Sign-In with Ethereum) allows anyone to integrate passwordless web3-native authentication and authorization into their applications. Users can then login using any wallet (in-app, external, or smart wallet). This allows developers to create a familiar, secure authentication flow that works with traditional backends while leveraging the features of a web3 application. ### Live Playground Try out SIWE auth for yourself in the [auth live playground](https://playground.thirdweb.com/connect/auth) ### Configuring thirdweb auth In your backend, configure the auth object with the `createAuth` function. ```tsx import { createThirdwebClient } from "thirdweb"; import { createAuth } from "thirdweb/auth"; const client = createThirdwebClient({ secretKey, // always use secret key for backend code }); const thirdwebAuth = createAuth({ domain: "localhost:3000", // your domain client, // your backend wallet to sign login payloads adminAccount: privateKeyToAccount({ client, privateKey }), }); ``` The `createAuth` helper returns an object with all the functions you will need to authenticate users. Check out the [createAuth API reference](https://portal.thirdweb.com/auth/siwe) for more details. Your backend can use those functions to expose a SIWE compliant login flow to your frontend. Here's an example using server actions and a JWT for session management: ```tsx export async function generatePayload(params) { // generates a SIWE compliant login payload to return to the client return thirdwebAuth.generatePayload(params); } export async function login(params) { // verify the user's signature const verifiedPayload = await thirdwebAuth.verifyPayload(params); if (verifiedPayload.valid) { // generate a JWT for the client (or use your own method to store the user session) const jwt = await thirdwebAuth.generateJWT({ payload: verifiedPayload, }); // set the JWT in cookies, or return it to the client to use as needed setJWTCookie(jwt); return true; } else { // the payload is not valid, you can return an error message to the client return false; } } export async function getUser() { // check if the user is logged in with cookies, storage, or your method of choice const jwt = getJWTCookie(); const { valid, parsedJWT } = await thirdwebAuth.verifyJWT({ jwt }); if (valid) { return authResult.parsedJWT.sub; // sub is the user's address } return null; } export async function logout() { // logout the user, delete cookies, etc. } ``` ### Usage with UI components You can then add a SIWE step to the connection flow of the `ConnectWallet` or `ConnectEmbed` UI component by configuring the `auth` option. This will automatically trigger the wallet to sign the login payload returned by `getLoginPayload` and trigger the `doLogin` function you implemented in your backend. ```tsx import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; import { generatePayload, getUser, login, logout, } from "@/server/actions/auth"; export default function App() { const [loggedIn, setLoggedIn] = useState(false); return ( // The ThirdwebProvider should be at the root of your application, but the ConnectButton can be anywhere { // here you should call your backend, using generatePayload to return // a SIWE compliant login payload to the client return generatePayload(params); }, doLogin: async (params) => { // here you should call your backend to verify the signed payload passed in params // this will verify that the signature matches the intended wallet return login(params); }, isLoggedIn: async () => { // here you should ask you backend if the user is logged in // can use cookies, storage, or your method of choice const user = await getUser(); return !!user; }, doLogout: async () => { // here you should call your backend to logout the user if needed // and delete any local auth tokens return logout(); }, }} /> ); } ``` ### Using your own UI You can use the [signLoginPayload](https://portal.thirdweb.com/references/typescript/v5/signLoginPayload) function to trigger the signing of the login payload yourself. This can be useful if you want to use a custom UI for the login flow. You can get the active account that will sign the payload from the [useActiveAccount](https://portal.thirdweb.com/references/typescript/v5/useActiveAccount) hook. ## AutoConnect Automatically connects the last connected wallet in the case a user reloads the page or revisits the app at a later time. This component has no UI, simply mount it anywher in your app to trigger the auto connection flow on page load. If you are using [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton)or [ConnectEmbed](https://portal.thirdweb.com/react/v5/ConnectEmbed) components, You don't need to use this component because it is already included. #### Example ```tsx import { createWallet, inAppWallet } from "thirdweb/wallets"; import { AutoConnect } from "thirdweb/react"; // wallets used in your app const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), ]; function Example() { return ( ); } ``` ### Props ## ConnectButton ConnectButton component renders a ` ); } ``` ### Creating Wallets You can create any wallet by id with auto completion using the [createWallet](https://portal.thirdweb.com/references/typescript/v5/createWallet) function. Or use one of the first party wallets like [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) or [ecosystemWallet](https://portal.thirdweb.com/references/typescript/v5/ecosystemWallet). ### Pre Connection Hooks Use these hooks to trigger and manage wallet connection within your own UI. Refer to [wallet connection hooks reference](https://portal.thirdweb.com/references/typescript/v5/useConnect) for more information. ### Post Connection Hooks Once the wallet is connected, you can use the [wallet connection hooks](https://portal.thirdweb.com/references/typescript/v5/hooks#wallet-connection) to get information about the connected wallet like getting the address, account, etc. ## Connecting Wallets Use the prebuilt UI components or create your own UX with hooks to connect wallets in your app. ## UI Components You can use [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton) or [ConnectEmbed](https://portal.thirdweb.com/react/v5/ConnectEmbed) component for a quick, easy and customizable UI. These components provide a prebuilt UI for connecting various wallets and take care of a lot of wallet-specific edge cases - so you can focus on building your app. ```tsx import { createThirdwebClient } from "thirdweb"; import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId }); export default function App() { return ( ); } ``` These components support over 500+ wallets, including support in-app wallets and account abstraction. It also automatically shows all installed `EIP-6963` compliant wallet extensions installed by the user. ### Creating Wallets You can create any wallet by id with auto completion using the [createWallet](https://portal.thirdweb.com/references/typescript/v5/createWallet) function. Or use one of the first party wallets like [inAppWallet](https://portal.thirdweb.com/references/typescript/v5/inAppWallet) or [ecosystemWallet](https://portal.thirdweb.com/references/typescript/v5/ecosystemWallet). ### React Components The SDK supports 500+ wallets out of the box, all you need to pass is their id. ### Post Connection Once the wallet is connected, you can use the [Connection hooks](https://portal.thirdweb.com/react/v5/connecting-wallets/hooks) to get information about the connected wallet like getting the address, account, etc ## Extensions Get familiar with the concept of extensions and how to use them in your project. ### Using read extensions in React Any extension that reads from the blockchain can be used with `useReadContract`. The extension function itself be passed as the first argument, and the extension's parameters must be passed as the second argument. ```ts import { getContract } from "thirdweb"; import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const ownedNFTs = useReadContract(getOwnedNFTs, { contract, address: "0x...", }); }; ``` ### Using write extensions in React For extensions that write to the blockchain, they work the same way as raw contract calls using `useSendTransaction`. Write extensions always return a `Transaction` object that can be passed to `useSendTransaction`. Note that unlike in TypeScript core, `useSendTransaction` does not require passing the active `Account`, it will used the current active account from the React context. ```ts import { getContract } from "thirdweb"; import { useSendTransaction } from "thirdweb/react"; import { mintTo } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const { mutate: sendTransaction, isPending } = useSendTransaction(); const onClick = async () => { const transaction = mintTo({ contract, to: "0x...", nft: { name: "NFT Name", description: "NFT Description", image: "https://example.com/image.png", }, }); sendTransaction(transaction); }; }; ``` ## Getting Started You can get started by creating a new project or adding thirdweb to an existing project. ### New Projects You can quickly create a new project with the thirdweb CLI ```bash npx thirdweb create app ``` or clone the the Next.js or Vite starter repo: [GitHubNext.js + thirdweb starter repo](https://github.com/thirdweb-example/next-starter)[GitHubVite + thirdweb starter repo](https://github.com/thirdweb-example/vite-starter) ### Existing Projects Install the thirdweb packages in your project npmyarnpnpm `npm i thirdweb ` ### Build your app * #### Setup the ThirdwebProvider At the root of your application, wrap your app with a `ThirdwebProvider` component. This keeps state around like the active wallet and chain. ```tsx // src/main.tsx import { ThirdwebProvider } from "thirdweb/react"; function Main() { return ( ); } ``` * #### Create the thirdweb client Head to the [thirdweb dashboard](https://thirdweb.com/team), create your account (or sign in), and click **Projects** to see all your projects. Create a Project with `localhost` included in the allowed domains. Securely store your secret key and copy your client id for use in the next step. Create a `.env` file and add your client ID there. Then create a `client.ts` file with the following content: ```tsx // src/client.ts import { createThirdwebClient } from "thirdweb"; export const client = createThirdwebClient({ clientId: process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID, }); ``` You only need to define the client once. Exporting the client variable will allow you to use anywhere in your app. * #### Connect a wallet There are two ways to connect users to your app: * The prebuilt `ConnectButton` or `ConnectEmbed` components. * Your own custom button. In this guide, we'll use the prebuilt `ConnectButton` component. ```tsx // src/app.tsx import { client } from "./client"; import { ConnectButton } from "thirdweb/react"; function App() { return (
); } ``` The `ConnectButton` and `ConnectEmbed` components come with built-in support for 500+ of wallets, 2000+ chains, fiat on-ramping, crypto swapping, transaction tracking, and more. You can also build your own custom button using the [useConnect](https://portal.thirdweb.com/react/v5/connecting-wallets/hooks) hook. * #### Get the connected wallet information Once the user has connected their wallet, you can get the wallet address, balance, and other details. ```tsx import { useActiveAccount, useWalletBalance } from "thirdweb/react"; export default function App() { const account = useActiveAccount(); const { data: balance, isLoading } = useWalletBalance({ client, chain, address: account.address, }); return (

Wallet address: {account.address}

Wallet balance: {balance?.displayValue} {balance?.symbol}

); } ``` * #### Read blockchain data You can read contract state with the [useReadContract](https://portal.thirdweb.com/react/v5/useReadContract) hook. This works with any contract call. Simply specify the solidity function signature to get a type safe API for your contract. ```tsx import { client } from "./client"; import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useReadContract } from "thirdweb/react"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); export default function App() { const { data, isLoading } = useReadContract({ contract, method: "function tokenURI(uint256 tokenId) returns (string)", params: [1n], // type safe params }); return (

Token URI: {data}

); } ``` Using [Extensions](https://portal.thirdweb.com/react/v5/extensions) you can do powerful queries like getting all the owned NFTs of a specific address, and generate performant typesafe functions for your contract. ```tsx import { client } from "./client"; import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); export default function App() { const { data: ownedNFTs } = useReadContract(getOwnedNFTs, { contract, address: "0x...", }); return (

Owned NFTs: {ownedNFTs}

); } ``` * #### Execute transactions You can execute transactions with the [useSendTransaction](https://portal.thirdweb.com/react/v5/useSendTransaction) hook. Prepare a transaction with the [prepareContractCall](https://portal.thirdweb.com/references/typescript/v5/prepareContractCall) function and pass it to the `sendTransaction` function. ```tsx import { client } from "./client"; import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useSendTransaction } from "thirdweb/react"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); export default function App() { const { mutate: sendTransaction } = useSendTransaction(); const onClick = async () => { const transaction = prepareContractCall({ contract, method: "function mint(address to)", params: ["0x..."], // type safe params }); sendTransaction(transaction); }; return (
); } ``` Using [Extensions](https://portal.thirdweb.com/react/v5/extensions/use) you can do more complex transactions like a claim, batch mint, and more. These will handle all the preprocessing needed before calling the contract. ```tsx import { client } from "./client"; import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useSendTransaction } from "thirdweb/react"; import { mintTo } from "thirdweb/extensions/erc721"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); export default function App() { const { mutate: sendTransaction } = useSendTransaction(); const onClick = async () => { // this mint extension handles uploading metadata to IPFS and pining it const transaction = mintTo({ contract, to: "0x...", nft: { name: "NFT Name", description: "NFT Description", image: "https://example.com/image.png", }, }); sendTransaction(transaction); }; return (
); } ``` ### Learn more You now have all the basics to build your own app with thirdweb. You can also check out the [full thirdweb SDK reference](https://portal.thirdweb.com/references/typescript/v5) to learn more about the different hooks and functions available. ## Sponsor Transactions By using [Account abstraction](https://portal.thirdweb.com/connect/account-abstraction) or [In-App Wallets](https://portal.thirdweb.com/connect/in-app-wallet/overview), you can sponsor all gas costs for your users transactions. #### Sponsored transactions To set up sponsored transactions, set the `sponsorGas` option to `true` in the smart account configuration. All transactions performed with the smart account will then be sponsored by your application. Testnet transactions are free, but you need a valid credit card on file for mainnet transactions. ### Live Playground Try out the demo for yourself in the [sponsored transactions playground](https://playground.thirdweb.com/connect/account-abstraction/sponsor) ### Sponsor transactions for all in-app wallets To enable account abstraction for in-app wallets, you need to add the `smartAccount` prop with the `inAppWallet` creation. ```jsx import { ConnectButton } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; const wallets = [ inAppWallet({ smartAccount: { chain: sepolia, sponsorGas: true, }, }), ]; export default function App() { return ( ); } ``` This will create an in-app wallet and a smart account for the user. The smart account will be initialized with the in-app wallet as the owner. You can sponsor transactions simply by passing `sponsrGas: true` to the `smartAccount` prop. This will allow the smart account to send transactions without the user needing to hold any ETH. ### Sponsor transactions for all connected wallets To sponsor transactions for all connected wallets, you can use the `sponsorGas` prop on the `ConnectButton` or `useConnect` hook. ```jsx import { createThirdwebClient } from "thirdweb"; import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID", }); export default function App() { return ( ); } ``` or with the `useConnect` hook: ```jsx import { useConnect } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; function App() { // 1. set the `accountAbstraction` configuration to convert wallets to smart accounts const { connect } = useConnect({ client, accountAbstraction: { chain: sepolia, // the chain where your smart accounts will be or is deployed sponsorGas: true, // enable or disable sponsored transactions }, }); const connectToSmartAccount = async () => { // 2. connect with the admin wallet of the smart account connect(async () => { const wallet = createWallet("io.metamask"); // or any other wallet await wallet.connect({ client, chain: sepolia, }); return wallet; }); }; return ( ); } ``` Once connected, all transactions sent via the `useSendTransaction` hook or the `TransactionButton` component will be sponsored. ## Build your own UI ### Low level control to authenticate and connect wallets You have full control with the connection hooks and functions to build your own UI. To use in-app wallets, you first choose an authentication strategy and then connect. ### Setup the ThirdwebProvider This will ensure that the wallet is available to all components in your app, handle connection states and auto-connection on page load. ```jsx import { ThirdwebProvider } from "thirdweb/react"; ; ``` ### Create an in-app wallet The simplest way to create an in-app wallet is to use the `inAppWallet()` function. By default, this will create a wallet that supports email/password login, Google, Apple, Facebook login, and passkey. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); ``` You can also customize the wallet by passing in options. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ auth: { mode, // options are "popup" | "redirect" | "window"; options, // ex: ["discord", "farcaster", "apple", "facebook", "google", "passkey"], passkeyDomain, // for passkey, the domain that the passkey is created on redirectUrl, // the URL to redirect to after authentication }, metadata, // metadata for the wallet partnerId, // partner ID for the wallet smartAccount, // smart account options for the wallet }); ``` [View all in-app wallet options](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions). Once created, you can connect to the wallet using the `connect()` function with the desired `strategy`. ### Authenticate via Google Note that for Apple and Facebook, you just need to update the strategy to "facebook" or "apple". In React and React Native, the `useConnect()` hook handles authentication and connection states. ```tsx import { inAppWallet } from "thirdweb/wallets"; import { useConnect } from "thirdweb/react"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "google", }); return wallet; }); }; ``` Other social options include Apple, Facebook, Discord, Farcaster and more. ### Authenticate via Email verification ```typescript import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const preLogin = async (email: string) => { // send email verification code await preAuthenticate({ client, strategy: "email", email, // ex: user@example.com }); }; const handleLogin = async ( email: string, verificationCode: string, ) => { // verify email and connect await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "email", email, verificationCode, }); return wallet; }); }; ``` ### Authenticate via Phone number verification ```typescript import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const preLogin = async (phoneNumber: string) => { // send phone number verification code await preAuthenticate({ client, strategy: "phone", phoneNumber, // ex: +1234567890 }); }; const handleLogin = async ( phoneNumber: string, verificationCode: string, ) => { // verify phone number and connect await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "phone", phoneNumber, verificationCode, }); return wallet; }); }; ``` ### Authenticate via Passkey #### React Native support For React Native, `passkeyDomain` is required and must be set to a valid app universal link. To setup universal links for your application, follow the [iOS documentation](https://developer.apple.com/documentation/xcode/supporting-associated-domains) and [Android documentation](https://developer.android.com/identity/sign-in/credential-manager#add-support-dal). ```typescript import { inAppWallet, hasStoredPasskey, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet({ auth: { passkeyDomain: "example.com", // defaults to current url }, }); const hasPasskey = await hasStoredPasskey(client); await wallet.connect({ client, strategy: "passkey", type: hasPasskey ? "sign-in" : "sign-up", }); return wallet; }); }; ``` ## Export Private Key Learn how to export the private key for a thirdweb in-app wallet using the Connect modal. * #### Login Login to your in-app wallet on the application using the [ConnectButton](https://portal.thirdweb.com/react/v5/connect-button) component. * #### Manage Select "Manage Wallet". ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fmanage-wallet.c0f64900.png&w=1920&q=75) * #### Export Choose "Export Private Key" and confirm the action to reveal the private key. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fexport-key.92a825c7.png&w=1920&q=75) * #### Confirm Confirm you want to reveal your private key. #### Secure Private Keys Revealing private keys can compromise your assets and security. Keep them safe and confidential at all times. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fconfirm-reveal.b058edda.png&w=1920&q=75) * #### Reveal Copy the exported private key directly from the modal. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fexported-key.fb9b0156.png&w=1920&q=75) #### Advanced Configuration As an advanced option, to hide the export private key option from the modal, set the `hidePrivateKeyOption` to `true` ## Retrieving In-App Wallet User Details on the Server You can query user details through the thirdweb SDK using a wallet address, email, phone number, or user ID. **This function requires a secret key to be present on the thirdweb client and should only be used on the server.** WalletEmailPhoneUser ID ```ts import { getUser } from "thirdweb"; const user = await getUser({ client, walletAddress: "0x123...", }); ``` ## Interact with wallets Once connected, you can interact with the wallet using the `thirdweb/wallets/inApp` specific methods. ### Get the user email ```typescript import { getUserEmail } from "thirdweb/wallets/in-app"; const email = await getUserEmail({ client }); console.log("user email", email); ``` ### Get the user's account ReactTypeScript ```typescript import { useActiveAccount } from "thirdweb/react"; const account = useActiveAccount(); ``` ### Get the user's wallet address ReactTypeScript ```typescript import { useActiveAccount } from "thirdweb/react"; const account = useActiveAccount(); console.log("wallet address", account.address); ``` ### Get wallet balance ```typescript await getWalletBalance({ client, chain, address: account.address, }); ``` ### Sign a message ```typescript await inAppWallet.sign("Hello World!"); ``` ## Interact with the blockchain Once connected, in-app wallets can be used alongside the [Contract SDK](https://portal.thirdweb.com/contracts) to interact with the blockchain. ### Initialize the SDK With Your Wallet React & React Native Other Frameworks The `ThirdwebProvider` handles maintaining the connection state, and allows using all the hooks in the SDK to interact with the blockchain as the connected user. Here's an example using the `TransactionButton` component to claim an NFT on a smart contract: ```tsx export default function App() { const account = useActiveAccount(); return (
{ if (!account) { return alert("Please connect your wallet"); } return claimTo({ contract, to: account.address, quantity: 1, }); }} > Claim NFT
); } ``` ### Full Reference View everything you can do in the Connect SDK once you have connected your wallet: ## Link Profiles When using [in-app wallets](https://portal.thirdweb.com/react/v5/in-app-wallet/get-started) or [ecosystem wallets](https://portal.thirdweb.com/react/v5/ecosystem-wallets/get-started), you can link profiles to your account. This allows users to login with a frictionless method like guest, passkey or email, then later link their wallet or social profile to their account. Once linked, users can login to their account with any of their linked profiles. ### Live Playground Try out the demo for yourself in the [link profiles live playground](https://playground.thirdweb.com/connect/in-app-wallet) ### Available auth methods * Email * Phone * Passkey * Guest * Wallet * Google * Apple * Facebook * X * Discord * Telegram * Twitch * Farcaster * Github * Line * Coinbase * Steam * Backend ### Usage with UI Components When using [ConnectButton](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) or [useWalletDetailsModal](https://portal.thirdweb.com/references/typescript/v5/useWalletDetailsModal), users can link a new profile by clicking the "Manage Wallet" button, as long as they are connected with an in-app or ecosystem wallet. ### Usage with your own UI You can use the [useLinkProfile](https://portal.thirdweb.com/references/typescript/v5/useLinkProfile) function to link a new profile to your account. This can be useful if you want to use a custom UI for the linking flow. ## In-App Wallets Create in-app wallet for your users based on their email, phone, passkey, social auth or even their external wallets. These wallets are scoped by your clientId and do not require any confirmation to sign transactions. ### Available auth methods * Email * Phone * Passkey * Guest * Wallet * Google * Apple * Facebook * X * Discord * Telegram * Twitch * Farcaster * Github * Line * Coinbase * Steam * Backend ### Live Playground Try out in-app wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/in-app-wallet) ### Configure in-app wallets The simplest way to create an in-app wallet is to use the `inAppWallet()` function. By default, this will create a wallet that supports email/password login, Google, Apple, Facebook login, and passkey. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); ``` You can also customize the wallet by passing in options. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ auth: { mode, // options are "popup" | "redirect" | "window"; options, // ex: ["discord", "farcaster", "apple", "facebook", "google", "passkey"], passkeyDomain, // for passkey, the domain that the passkey is created on redirectUrl, // the URL to redirect to after authentication }, metadata, // metadata for the wallet (name, icon, etc.) smartAccount, // smart account options for the wallet (for gasless tx) }); ``` [View all in-app wallet options](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions). Once created, you can use it either with the prebuilt UI components, or with your own UI. ### Usage with Connect UI components The easiest way to use in-app wallets is using the prebuilt connect UI components like [ConnectButton](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) and [ConnectEmbed](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbed) to authenticate users and connect their wallets. By default, the connect UI supports multiple social logins as well as email, phone and passkey authentication. You can customize which authentication methods to support which will be reflected in the UI. #### Authentication Order By default, email login is displayed before phone number login. To display phone number first, add "phone" before "email" in the providers array ```tsx import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; const client = createThirdwebClient({ clientId }); const wallets = [ inAppWallet({ auth: { options: ["email", "passkey", "google"] }, }), ]; export default function App() { return ( ); } ``` ### Usage with your own UI You have full control with the connection hooks and functions to build your own UI. Pick an authentication strategy and then connect. #### Setup the ThirdwebProvider This will ensure that the wallet is available to all components in your app, handle connection states and auto-connection on page load. ```jsx import { ThirdwebProvider } from "thirdweb/react"; ; ``` #### Authenticate via Google Note that for Apple and Facebook, you just need to update the strategy to "facebook" or "apple". In React and React Native, the `useConnect()` hook handles authentication and connection states. ```tsx import { inAppWallet } from "thirdweb/wallets"; import { useConnect } from "thirdweb/react"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "google", }); return wallet; }); }; ``` Other social options include Apple, Facebook, Discord, Farcaster and more. #### Authenticate via Email verification ```typescript import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const preLogin = async (email: string) => { // send email verification code await preAuthenticate({ client, strategy: "email", email, // ex: user@example.com }); }; const handleLogin = async ( email: string, verificationCode: string, ) => { // verify email and connect await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "email", email, verificationCode, }); return wallet; }); }; ``` #### Authenticate via Phone number verification ```typescript import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const preLogin = async (phoneNumber: string) => { // send phone number verification code await preAuthenticate({ client, strategy: "phone", phoneNumber, // ex: +1234567890 }); }; const handleLogin = async ( phoneNumber: string, verificationCode: string, ) => { // verify phone number and connect await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "phone", phoneNumber, verificationCode, }); return wallet; }); }; ``` #### Authenticate via Passkey #### React Native support For React Native, `passkeyDomain` is required and must be set to a valid app universal link. To setup universal links for your application, follow the [iOS documentation](https://developer.apple.com/documentation/xcode/supporting-associated-domains) and [Android documentation](https://developer.android.com/identity/sign-in/credential-manager#add-support-dal). ```typescript import { inAppWallet, hasStoredPasskey, } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet({ auth: { passkeyDomain: "example.com", // defaults to current url }, }); const hasPasskey = await hasStoredPasskey(client); await wallet.connect({ client, strategy: "passkey", type: hasPasskey ? "sign-in" : "sign-up", }); return wallet; }); }; ``` #### Authenticate with an external wallet You can also use wallets as an authentication method, when using this method, both external and in-app wallets are connected, and you can switch between the 2 at any time. ```typescript import { inAppWallet } from "thirdweb/wallets/in-app"; import { sepolia } from "thirdweb/chains"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "wallet", wallet: createWallet("io.metamask"), // or any other wallet chain: sepolia, // required for SIWE }); return wallet; }); }; ``` #### Authenticate as Guest You can also create wallets for your users without any input at all. This will create a session that can be later upgraded by linking another identity. Great for progressive onboarding. ```typescript import { inAppWallet } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "guest", }); return wallet; }); }; ``` ### Bring your own auth From the in-app wallet settings on the thirdweb dashboard, you can enable [custom authentication with your own JWT or auth endpoint](https://portal.thirdweb.com/connect/in-app-wallet/custom-auth/configuration) #### OICD compliant JWT Pass any OICD compliant JWT, can be used with firebase, auth0, and more. ```typescript import { inAppWallet } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "jwt", jwt: "your-jwt", }); return wallet; }); }; ``` #### Custom Auth endpoint Fully custom auth endpoint, pass your own payload and configure your auth verification endpoint on the thirdweb dashboard. This approach lets you use virtually any auth method you can imagine. ```typescript import { inAppWallet } from "thirdweb/wallets/in-app"; const { connect } = useConnect(); const handleLogin = async () => { await connect(async () => { const wallet = inAppWallet(); await wallet.connect({ client, strategy: "auth_endpoint", payload: "your-auth-payload", }); return wallet; }); }; ``` [Migrate from React v4](https://portal.thirdweb.com/react/v5/migrate) ## Interacting with contracts With SDK v4, you always have to "load" a contract with `useContract`. This process adds complexity to your app and inpacts its performance. In the latest version, a smart contract (type: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract)) represents a simple object containing info about the contract address, the chain it was deployed on, and the thirdweb client object. Example for declaring a smart contract on Ethereum mainnet ```tsx import { getContract, createThirdwebClient } from "thirdweb"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: process.env.NEXT_PUBLIC_TW_CLIENT_ID, }); const contract = getContract({ address: "0x....", chain: ethereum, client, }); ``` ### Contract extensions This is a new terminology that we introduced in the new SDK. Basically, each extension represents a method of a contract, be it a "write" or a "read" method. An extension is a function that returns a [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) which in turn can be executed in a React hook for interacting with the contract. We will talk more about it in the section below. One of the amazing updates that v5 brings is the rich set of prebuilt extensions. They are the contract methods that have been precompile to ensure a typesafe & performant developer experience. Check out the list of over 100 prebuilt extensions [here](https://portal.thirdweb.com/typescript/v5/extensions/built-in), ranging from ERC20, ERC721, ERC1155 to top popular DeFi protocols like Uniswap, Farcaster & Lens. Example: Import an ERC1155 "read" extension, for checking the balance of a wallet ```tsx import { balanceOf } from "thirdweb/extensions/erc1155"; const transaction = balanceOf({ contract, owner: "0x...", tokenId: 0n, }); ``` ### Reading states of a contract Given the task of calling `balanceOf` from an ERC1155 contract, we'll be comparing the code between v4 and v5 ##### SDK v4 ```tsx import { useNFTBalance, useContract } from "@thirdweb-dev/react"; function App() { const { contract } = useContract(contractAddress); const { isLoading, data, error } = useNFTBalance( contract, "{{wallet_address}}", "{{token_id}}", ); } ``` ##### SDK v5 ```tsx import { getContract, createThirdwebClient } from "thirdweb"; import { balanceOf } from "thirdweb/extensions/erc1155"; import { ethereum } from "thirdweb/chains"; import { client } from "@lib/client"; const contract = getContract({ address: "0x....", chain: ethereum, client, }); function App() { const { data } = useReadContract(balanceOf, { contract, owner: "0x...", tokenId: 0n, }); } ``` As you can see from the example above, we introduced the hook [useReadContract](https://portal.thirdweb.com/references/typescript/v5/useReadContract) in v5\. You should use it to perform any contract "read" in your React app. It is the perfect replacement for the old chunky React hooks from v4. The formula for reading a contract state is: ``` ``` ##### If the extension you are looking for is not included in the SDK You can always use the function signature with `useReadContract` (It's also typesafe) ```tsx useReadContract({ contract, method: "function balanceOf(address _owner, uint256 tokenId) view returns (uint256)", ... }) ``` ##### A tip for getting a function's signature Go to the thirdweb Dashboard's explorer page and select the function that you want to interact with. You should see the "Use this function in your app" section with the code snippet for the signature of the function. [An example](https://thirdweb.com/avalanche-fuji/0xd5e815241882676F772A624E3892b27Ff3a449c4/explorer?name=balanceOf) ### Writing to a contract In v5, you can utilize the following hooks for writing to contracts: [useSendTransaction](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction) and [useSendAndConfirmTransaction](https://portal.thirdweb.com/references/typescript/v5/useSendAndConfirmTransaction). The main difference between the 2 hooks is that `useSendTransaction` will mark the request as "complete" once the transaction is sent, while `useSendAndConfirmTransaction` will wait until the transaction is included in the blockchain. Given the task of claiming an NFT from an NFT Drop collection, let's compare the code between the SDK v4 and v5 ##### SDK V4 ```tsx import { useContract, useClaimNFT } from "@thirdweb-dev/react"; function App() { const { contract } = useContract(contractAddress); const { mutateAsync: claimNft, isLoading, error, } = useClaimNFT(contract); return ( claimNft({ to: "{{wallet_address}}", // Use useAddress hook to get current wallet address quantity: 1, }) } > Claim NFT ); } ``` ##### SDK v5 ```tsx import { useSendTransaction } from "thirdweb/react"; import { claimTo } from "thirdweb/extension/erc721"; function App() { const transaction = claimTo({ contract, quantity: 1n, to: "0x...", }); const { mutateAsync: claimNft } = useSendTransaction(); return ; } ``` Another beautiful thing about the SDK v5 is that it comes with the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton)which allows you to make a contract call _without_ having to use the above React hooks. As you can see, the code is much cleaner this way! ```tsx import { TransactionButton } from "thirdweb/react"; import { claimTo } from "thirdweb/extension/erc721"; function App() { return ( claimTo({ contract, quantity: 1n, to: "0x..." }) } > Claim ); } ``` ## Cheatsheet #### React Cheatsheet | Task | @thirdweb-dev/react | thirdweb | | ------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | Provider | import { ThirdwebProvider} from @thirdweb-dev/react | [import { ThirdwebProvider } from "thirdweb/react"](https://portal.thirdweb.com/react/v5/ThirdwebProvider) | | Contract | useContract(...) | [getContract(...) // not a hook](https://portal.thirdweb.com/references/typescript/v5/getContract) | | Address | useAddress(...) | [useActiveAccount(...) // account?.address](https://portal.thirdweb.com/references/typescript/v5/useActiveAccount) | | Read | useContractRead(...) | [useReadContract(...)](https://portal.thirdweb.com/references/typescript/v5/useReadContract) | | Write | useContractWrite(...) | [useSendTransaction()](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction) | | Extensions | useNFTs(...) | [useReadContract(getNFTs, { ... })](https://portal.thirdweb.com/references/typescript/v5/useReadContract) | | Get Signer | useSigner() | [useActiveAccount()](https://portal.thirdweb.com/references/typescript/v5/useActiveAccount) | | Get Wallet | useWallet() | [useActiveWallet()](https://portal.thirdweb.com/references/typescript/v5/useActiveWallet) | | Button | Web3Button | [TransactionButton](https://portal.thirdweb.com/react/v5/TransactionButton) | | Connect | ConnectWallet | [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton) | | Connection Status | useConnectionStatus() | [useActiveWalletConnectionStatus()](https://portal.thirdweb.com/references/typescript/v5/useActiveWalletConnectionStatus) | | Switch Chain | useSwitchChain() | [useSwitchActiveWalletChain()](https://portal.thirdweb.com/references/typescript/v5/useSwitchActiveWalletChain) | | Get Connected Chain | useChain() | [useActiveWalletChain()](https://portal.thirdweb.com/references/typescript/v5/useActiveWalletChain) | #### TypeScript Cheatsheet | Task | @thirdweb-dev/sdk | thirdweb | | ---------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | | Chains | import { Sepolia } from "@thirdweb-dev/chains" | [import { sepolia } from "thirdweb/chains"](https://portal.thirdweb.com/typescript/v5/chain) | | Wallets | import { MetaMaskWallet } from "@thirdweb-dev/wallets" | [import { createWallet } from "thirdweb/wallets"](https://portal.thirdweb.com/references/typescript/v5/createWallet) | | Initialize | new ThirdwebSDK(...) | [createThirdwebClient({ ... })](https://portal.thirdweb.com/references/typescript/v5/createThirdwebClient) | | Contract | await sdk.getContract(...) | [getContract(...) // no await](https://portal.thirdweb.com/references/typescript/v5/getContract) | | Read | await contract.call(...) | [await readContract(...)](https://portal.thirdweb.com/references/typescript/v5/readContract) | | Prepare | await contract.prepare(...) | [prepareContractCall(...) // no await](https://portal.thirdweb.com/references/typescript/v5/prepareContractCall) | | Send | await contract.call(...) | [await sendTransaction(...)](https://portal.thirdweb.com/references/typescript/v5/sendTransaction) | | Extensions | await contract.erc721.getAll() | [await getNFTs(...)](https://portal.thirdweb.com/references/typescript/v5/erc721/getNFTs) | | Deploy | sdk.deployer.deployBuiltInContract(...) | [await deployPublishedContract(...)](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPublishedContract) | ## Ethers.js in v5 One common misconception about the thirdweb SDK v5 is that it will no longer work with Ethers.js. As a matter of fact, the SDK v5 is built so that it can play well with polular web3 SDKs like viem, ethers v5 and ether v6! Let's say you decide to upgrade to v5, and still want to stick with ethers.js, you can utilize thirdweb's ethers Adapter to achieve that! #### Signer In v5, instead of having "signer", we pivoted to [Account](https://portal.thirdweb.com/references/typescript/v5/Account), which is the replacement for "signer". Thanks to the thirdweb ethers adapter, you can conveniently convert between ethers's Signer and thirdweb's Account. ```ts import { ethers5Adapter } from "thirdweb/adapters/ethers5"; import { useActiveAccount } from "thirdweb/react"; const account = useActiveAccount(); ... const signer = await ethers5Adapter.signer.toEthers({ client, chain, account }); ``` Once you have the signer, you can perform different tasks using ethers.js as usual: ```tsx // Get balance const balance = await signer.getBalance(); // Sign message const signature = await signer.signMessage(message); ``` #### Provider Similar to `signer`, you can retrieve the ethers provider in thirdweb v5 using the same adapter: ```ts import { ethers5Adapter } from "thirdweb/adapters/ethers5"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "...", }); const provider = ethers5Adapter.provider.toEthers({ client, chainId, }); ``` and perform tasks with it: ```ts const blockNumber = await provider.getBlockNumber(); ``` #### Contracts Similarly to the 2 components above, here's how you can convert a [thirdweb contract instance](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) to ethers's: ```tsx import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const ethersContract = await ethers5Adapter.contract.toEthers({ thirdwebContract, }); ``` and then do stuff with it: ```tsx // Estimate gas const gasLimit = await contract.estimateGas["functionName"]( ...params, ); // Send a transaction const tx = await contract["functionName"](...params, { gasLimit }); ``` ## Migration from React SDK v4 ### Why you should migrate ##### 1\. Better performance, happier clients The new SDK is built with performance in mind and proper tree-shaking. Therefore, the minimum bundle size of your application is greatly reduced. Below is the comparison of 2 similar applications, using `ConnectWallet` (v4) & `ConnectButton` (v5), which are identical in term of functionality. | SDK v4 | SDK v5 | | | ------------------- | ------------------------------------------------------------------------------- | --------------------- | | Minimum bundle size | 766kb | 104kb | | Dependencies | "@thirdweb-dev/react": "^4.9.4""@thirdweb-dev/sdk": "^4.0.99""ethers": "^5.7.2" | "thirdweb": "^5.42.0" | _(Built with Next.js 14.2.5)_ ##### 2\. More wallets supported The SDK v4 only supports a handful of web3 wallets and the more wallets you want to include in your app, the heavier it becomes. SDK v5 supports over 300 wallets and this number is increasing! You can [interact with wallets based on their unique IDs](https://portal.thirdweb.com/typescript/v5/wallets#example-connect-a-wallet-and-access-an-account-to-send-a-transaction). Hence, adding more wallets to your app has little to no effect to the final bundle. ##### 3\. Flexibility with React hooks When building a React web3 application with thirdweb SDK v4, you have access to a set of prebuilt React hooks which let you conveniently interact with your smart contracts. The issue with this approach is that, the number of smart-contract methods is ever-increasing, and for each hook that does not exist, we have to dedicate time & energy to write, test & maintain. This process is time-consuming & frankly, the more React hooks you add to your app, the slower and more unmaintainable your projects become. In SDK v5, we introduce a novel concept called "prebuilt extensions" - a set of read & write methods for popular contracts which you can _plug & play_. For example: ###### Read contract states with v5 ```ts // Get a list of owned ERC721 tokens in a wallet import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const { data } = useReadContract(getOwned, { contract, owner }); ``` ###### Write to contract with v5 ```ts // Claim an NFT from thirdweb Drop contract import { useSendTransaction } from "thirdweb/react"; import { claimTo } from "thirdweb/extensions/erc721"; const { mutate: sendTx } = useSendTransaction(); const transaction = claimTo({ contract, to: "0x...", quantity: 1n, }); sendTx(transaction); ``` As you can see, by pairing the contract extensions with `useReadContract` (for read) and `useSendTransaction` (for write), we are able to greatly reduce the amount of code that is packaged & shipped to the end users. Plus, with this approach we can dedicate more time to building contract extensions. The SDK v5 currenty supports over hundreds of extensions, with some popular protocols like Uniswap, Farcaster, Lens & more to come. View a list of [supported extensions](https://portal.thirdweb.com/typescript/v5/extensions/built-in) here, or [build your own](https://portal.thirdweb.com/typescript/v5/extensions/create)! ##### 4\. Access to latest software Currently the SDK v4 is using `ethers@5.7.2` and `@tanstack/react-query@^4` which can be considered "outdated". We unfortunately do not have a plan to upgrade v4's dependencies to the latest versions. We highly recommend you to migrate to the SDK v5 to receive the latest software with better security and performance. Want to keep using ethers.js 5? Worry not! The SDK v5 comes with powerful adapters which let you use thirdweb with popular web3 frameworks like viem or ethers 5 & 6. [Learn more](https://portal.thirdweb.com/typescript/v5/adapters#ethers-v5) --- #### Get started * [Installation & Setups](https://portal.thirdweb.com/typescript/v5/react/migrate/installation) * [Interacting with contracts](https://portal.thirdweb.com/typescript/v5/react/migrate/contracts) * [ethers.js Adapter](https://portal.thirdweb.com/typescript/v5/react/migrate/ethers-adapter) * [Cheatsheet](https://portal.thirdweb.com/typescript/v5/react/migrate/cheatsheet) ## Funding wallets Let users fund their wallets with crypto or fiat on all the supported chains. ### Live Playground Try out the demo for yourself in the [fund wallets live playground](https://playground.thirdweb.com/connect/pay) ### Usage with UI Components The easiest way to fund wallets is to use the `PayEmbed` prebuilt UI component. Note that the `ConnectButton` also has a built-in funding flow that can also be customised. ```tsx import { PayEmbed } from "thirdweb/react"; function App() { return ( ); } ``` Check out the [PayEmbed API reference](https://portal.thirdweb.com/references/typescript/v5/PayEmbed) for more information. ### Usage with your own UI If you want more control over the funding flow, you can use the [Buy with Crypto or Fiat hooks](https://portal.thirdweb.com/references/typescript/v5/hooks#buy-crypto) to create your own custom UI. [Migrate from React v4](https://portal.thirdweb.com/react/v5/migrate) ## Installation & Setups #### High-level changes * All imports from `@thirdweb-dev/*` should be replaced with `thirdweb` SDK with sub-exports. * The new SDK is `function` based rather than `class` based for better tree shaking and performance. * All contract calls are now prepared using `prepareContractCall` and sent using the `useSendTransaction` function. * Transactions are submitted without waiting for receipt by default. You can call the `useSendAndConfirmTransaction` function to wait for the transaction to be mined. ### Installation ##### Below is how you install thirdweb v4 SDKs npmyarnpnpmbun `npm i @thirdweb-dev/sdk @thirdweb-dev/react ethers@5.7.2 ` ##### With the latest version, everything comes in one single package npmyarnpnpmbun `npm i thirdweb ` ### Setups Once you have installed the latest package (alongside the older version that you want to replace), you can start the migration process. #### ThirdwebProvider In the latest SDK, the [ThirdwebProvider](https://portal.thirdweb.com/references/typescript/v5/ThirdwebProvider) no longer accepts any prop such as `activeChain`, `clientId` or any extra SDK options. Instead, you only need to pass the clientId when necessary (we'll talk more about this in a few sections below). ```tsx import { ThirdwebProvider } from "thirdweb/react"; ...; ``` ###### Progressive migration If you're currently using the `@thirdweb-dev/sdk`, you can progressively migrate to the new `thirdweb` SDK. Both SDKs can be used side by side and are interoperable with each other. In React, you can mix and match the v4 and v5 `ThirdwebProvider`, that gives you access to the hooks and functionality of both SDKs. This way, once you have moved away from all the v4 functionalities, you can finally remove the `ThirdwebProviderV4` from your app. ```tsx import { ThirdwebProvider as ThirdwebProviderV4 } from "@thirdweb-dev/react"; import { ThirdwebProvider } from "thirdweb/react"; // v5 ... ``` #### Connecting wallets Similar to v4's `ConnectWallet` component, the latest version has the [ConnectButton](https://portal.thirdweb.com/connect/sign-in/ConnectButton) component which has the same functionality. However, unlike with v4 where the number of supported wallets is limited (about 20), and adding more wallets mean your app becomes heavier, the SDK v5 supports [over 300 wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets) with virtually no impact to your application. Here's how you use the new `ConnectButton`: ```tsx import { createThirdwebClient } from "thirdweb"; import { ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: process.env.NEXT_PUBLIC_TW_CLIENT_ID, }); ; ``` To learn more about the new `ConnectButton`, head over to the [Playground](https://playground.thirdweb.com/connect/sign-in/button). Notice how you are passing the thirdweb client to the component itself and not to the `ThirdwebProvider` like in v4? By not putting every config inside the context wrapper, we were able to make the SDK v5 much more lightweight since you only load what you need! Tip: You can reuse the thirdweb client object by putting it in a file and export it. ```ts // @lib/client.ts import { createThirdwebClient } from "thirdweb"; export const client = createThirdwebClient({ clientId: process.env.NEXT_PUBLIC_TW_CLIENT_ID, }); ``` ## Chain Abstraction Facilitate transactions by letting users pay with any token from any chain, or with fiat. ### Live Playground Try out the demo for yourself in the [live playground](https://playground.thirdweb.com/connect/pay/transactions) ### Usage with PayEmbed You can use the `PayEmbed` component to let users execute a transaction from any chain, paying with any token. ```tsx import { claimTo } from "thirdweb/extensions/erc1155"; import { PayEmbed, useActiveAccount } from "thirdweb/react"; function App() { const account = useActiveAccount(); const { data: nft } = useReadContract(getNFT, { contract: nftContract, tokenId: 0n, }); return ( ); } ``` Check out the [PayEmbed API reference](https://portal.thirdweb.com/references/typescript/v5/PayEmbed) for more information. ### Usage with regular transactions Any transaction sent with `useSendTransaction` or with `TransactionButton` will prompt the user to choose a different payment method if they don't have enough balance for the transaction. You can turn off this behaviour by setting the `payModal` option to `false`. ## Read contract state Read onchain data from any contract on any chain. ### Live Playground Try out the demo for yourself in the [reading contract state playground](https://playground.thirdweb.com/connect/blockchain-api) ### Generic Contract Read Reading contract state in react is done via the `useReadContract` hook. The hook returns a React Query `data`, `isLoading`, and other useful state that you can use to render your component. ```ts import { getContract } from "thirdweb"; import { useReadContract } from "thirdweb/react"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const { data, isLoading } = useReadContract({ contract, method: "function tokenURI(uint256 tokenId) returns (string)", params: [1n], }); }; ``` ### Using Extensions Extensions are a way to make complex queries from a contract in a type-safe way with a simple API. ```tsx import { getContract } from "thirdweb"; import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const ownedNFTs = useReadContract(getOwnedNFTs, { contract, address: "0x...", }); }; ``` Check out all the [available extensions](https://portal.thirdweb.com/references/typescript/v5/functions#extensions) for more details. ### Generic Contract Events Query and listen to contract events with the `useContractEvents` hook. ```tsx import { useContractEvents } from "thirdweb/react"; import { prepareEvent } from "thirdweb"; const myEvent = prepareEvent({ signature: "event MyEvent(uint256 myArg)", }); const { data: events } = useContractEvents({ contract, eventName: [myEvent], }); ``` or with extensions: ```tsx import { useContractEvents } from "thirdweb/react"; import { tokensClaimedEvent } from "thirdweb/extensions/erc721"; const { data: events } = useContractEvents({ contract, events: [tokensClaimedEvent()], }); ``` ### API References Check out the [contract hooks](https://thirdweb.com/docs/references/typescript/v5/useReadContract) reference for more details. ## Migrate from RainbowKit Learn how to migrate to thirdweb's ConnectButton component from [RainbowKit](https://www.rainbowkit.com/). * #### Installation Install the connect SDK in your application npmyarnpnpmbun `npm i thirdweb ` #### Dependency Conflicts If you are installing thirdweb using `npm` and run into any dependency conflicts, install thirdweb using `npm install thirdweb --legacy-peer-deps` * #### Setup Wrap application using `ThirdwebProvider` and remove `RainbowKitProvider` ```jsx import { ThirdwebProvider } from "thirdweb/react"; . . . . function MyApp({ Component, pageProps }: AppProps) { return ( ); } ``` * #### Swap ConnectButton component Import `createThirdwebClient` and `ConnectButton` from thirdweb and add them to your application. Modify the `ConnectButton` component by adding the [client](https://portal.thirdweb.com/typescript/v5/client) prop. ```jsx import { ConnectButton } from "thirdweb/react"; import { createThirdwebClient } from "thirdweb"; . . . . const Home: NextPage = () => { const client = createThirdwebClient({ clientId: "", }); return (
); }; ``` #### Client ID Get a free client ID to use in your application by creating a project in [thirdweb's dashboard](https://thirdweb.com/team). * #### Customize To customize your ConnectButton component, view the cheatsheet below or [view the customization documentation](https://portal.thirdweb.com/connect/sign-in/customization). * #### (Optional) Adapters If you are using Wagmi, Viem, or Ethers in your application, use thirdweb adapters to continue using contracts, providers, and wallets from these libraries. [View the Adapter documentation.](https://portal.thirdweb.com/typescript/v5/adapters) ### Cheatsheet #### Installation ##### RainbowKit `npm install @rainbow-me/rainbowkit wagmi viem@2.x @tanstack/react-query` ##### thirdweb `npm install thirdweb` --- #### Initalization ##### RainbowKit ```jsx import "@rainbow-me/rainbowkit/styles.css"; import { getDefaultConfig, RainbowKitProvider, } from "@rainbow-me/rainbowkit"; import { WagmiProvider } from "wagmi"; import { mainnet, polygon, optimism, arbitrum, base, } from "wagmi/chains"; import { QueryClientProvider, QueryClient, } from "@tanstack/react-query"; const config = getDefaultConfig({ appName: "My RainbowKit App", projectId: "YOUR_PROJECT_ID", chains: [mainnet, polygon, optimism, arbitrum, base], ssr: true, // If your dApp uses server side rendering (SSR) }); const queryClient = new QueryClient(); const App = () => { return ( {/* Your App */} ); }; ``` ##### thirdweb ```jsx import { ThirdwebProvider } from "thirdweb/react"; const App = () => { return {/* Your App */}; }; ``` --- #### ConnectButton ##### RainbowKit ```jsx import { ConnectButton } from "@rainbow-me/rainbowkit"; export const YourApp = () => { return ; }; ``` ##### thirdweb ```jsx import { ConnectButton } from "thirdweb/react"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "your-client-id" }); export const YourApp = () => { return ; }; ``` --- #### Localization ##### RainbowKit ```jsx {/* Your App */} ; ``` ##### thirdweb ```jsx ; ``` --- #### Modal Sizes ##### RainbowKit ```jsx {/* Your App */} ; ``` ##### thirdweb ```jsx ; ``` --- #### Theming ##### RainbowKit ```jsx import { ...etc, darkTheme } from '@rainbow-me/rainbowkit'; {/* Your App */} ``` ##### thirdweb ```jsx ; ``` --- ### Templates [GitHubWagmi AdapterExample](https://github.com/thirdweb-example/wagmi-adapter-example)[GitHubEthers AdapterExample](https://github.com/thirdweb-example/ethers-adapter-example) ## Web3 Social Identities Query all web3 social identities for a given address. ### Supported Social Identities * [Farcaster](https://farcaster.xyz/) * [Lens Protocol](https://lens.xyz/) * [ENS](https://ens.domains/) ### Live Playground Try out the demo for yourself in the [web3 social identities live playground](https://playground.thirdweb.com/connect/social) ### Usage with UI Components When using [ConnectButton](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) or [useWalletDetailsModal](https://portal.thirdweb.com/references/typescript/v5/useWalletDetailsModal), the user's avatar and username will be automatically populated with their linked social profiles. ### Usage with your own UI Use the [useSocialProfiles](https://portal.thirdweb.com/references/typescript/v5/useSocialProfiles) hook to query all web3 social identities for a given address. ## React SDK On top of the core typescript API, `thirdweb/react` exports various Components and Hooks to easily connect wallets & interact with smart contracts ### Installation npmyarnpnpmbun `npm i thirdweb ` ### Quickstart Follow this [guide](https://portal.thirdweb.com/react/v5/getting-started) to get started with the React SDK. #### Have you generated a client ID? You'll need a client ID to access the SDK's free blockchain APIs, storage, and more. [ Generate ](https://thirdweb.com/create-api-key) ### Starter kits You can quickly create a new project with the thirdweb CLI ```bash npx thirdweb create app ``` or clone the the Next.js or Vite starter repo: [GitHubNext.js + thirdweb starter repo](https://github.com/thirdweb-example/next-starter)[GitHubVite + thirdweb starter repo](https://github.com/thirdweb-example/vite-starter) ### Live Playground You can interact with the React SDK in the [Live Playground](https://playground.thirdweb.com/). ### API Reference Browse the full API reference for detailed information on each function, hook and component. ## Transactions Sending a transaction in react is done via the `useSendTransaction` hook. The hook returns a React Query `mutate` function that you can call with a transaction object created with `prepareContractCall` or `prepareTransaction`. Note that unlike in TypeScript core, `useSendTransaction` does not require passing the active `Account`, it will used the current active account from the React context. ### Live Playground Try out the demo for yourself in the [sending transactions playground](https://playground.thirdweb.com/connect/transactions) ### Sending a generic contract call ```ts import { prepareContractCall, getContract } from "thirdweb"; import { useSendTransaction } from "thirdweb/react"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const { mutate: sendTransaction, isPending } = useSendTransaction(); const onClick = async () => { const transaction = prepareContractCall({ contract, method: "function mint(address to)", params: ["0x..."], value: 0, }); sendTransaction(transaction); }; }; ``` ### Using extensions Extensions are a way to make complex transactions in a type-safe way with a simple API. ```tsx import { getContract } from "thirdweb"; import { useSendTransaction } from "thirdweb/react"; import { mintTo } from "thirdweb/extensions/erc721"; const contract = getContract({ client, chain, address: "0x...", }); const MyComponent = () => { const { mutate: sendTransaction, isPending } = useSendTransaction(); const onClick = async () => { const transaction = mintTo({ contract, to: "0x...", nft: { name: "NFT Name", description: "NFT Description", image: "https://example.com/image.png", }, }); sendTransaction(transaction); }; }; ``` Check out all the [available extensions](https://portal.thirdweb.com/references/typescript/v5/functions#extensions) for more details. ### API References Check out the [transaction hooks](https://thirdweb.com/docs/references/typescript/v5/useSendTransaction) reference for more details. ## Differences from React The `thirdweb` package is designed to work with React Native, but there are some differences you should be aware of. #### Available wallets All wallets are supported on both web and React Native | Component | React | React Native | | ----------------- | ----- | ------------ | | inAppWallet | ✅ | ✅ | | smartWallet | ✅ | ✅ | | privateKeyAccount | ✅ | ✅ | | walletConnect | ✅ | ✅ | | coinbaseWallet | ✅ | ✅ | | injectedWallet | ✅ | ✅ | #### UI components Some UI components might not be implemented yet on React Native. However, you can build your own UI easily with the hooks and functions provided. | Component | React | React Native | | ----------------- | ----- | ---------------- | | ConnectButton | ✅ | ✅ | | ConnectEmbed | ✅ | ✅ | | TransactionButton | ✅ | ✅ | | PayEmbed | ✅ | ⚠️ (coming soon) | Interested in contributing to get these out sooner? Put up a PR on the [JS monorepo](https://github.com/thirdweb-dev/js)! thirdweb JS monorepo thirdweb JS monorepo is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-example/account-abstraction) ## Troubleshooting ### Expo Go Due to required native dependencies, you cannot use Expo Go for running your app. You must use a development build. You can create ios/android development builds using the following command: ```bash npx expo prebuild ``` You can then run the development build using the following command: ```bash npx expo run:ios ``` ```bash npx expo run:android ``` ### OpenSSL iOS build error If you see a build error that mentions OpenSSL, you may need to update `app.json` to pin a version of OpenSSL that is compatible with your Xcode version. Here's how to pin the OpenSSL version in `app.json`: ```json { "expo": { "plugins": [ "expo-build-properties", { "ios": { "extraPods": [ { "name": "OpenSSL-Universal", "configurations": [ "Release", "Debug" ], "modular_headers": true, "version": "" } ] } } ] } } ``` Replace `` with the correct version of OpenSSL for your Xcode version: * Xcode 16: `3.3.2000` * Xcode 15: `3.1.5004` Make sure you have `expo-build-properties` added to your `package.json` dependencies. ### Android minSdkVersion error If you see an Android error mentioning `minSdkVersion`, you may need to update your `app.json` to set the `minSdkVersion` to a higher version. Here's how to update the `minSdkVersion` in `app.json`: ```json { "expo": { "plugins": [ "expo-build-properties", { "android": { "minSdkVersion": 26 } } ] } } ``` Make sure you have `expo-build-properties` added to your `package.json` dependencies. ## React Native SDK You can use all of the `thirdweb` and `thirdweb/react` exports in your React Native app, with some exceptions (see differences). ### Quickstart Many of the components and hooks in the React Native SDK use a [client](https://portal.thirdweb.com/typescript/v5/core/client) to interface with the core SDK and your private RPC endpoints. You'll need to create a `clientId` in the [Dashboard](https://thirdweb.com/create-api-key) to generate this client. #### Have you generated a client ID? You'll need a client ID to access the SDK's free blockchain APIs, storage, and more. [ Generate ](https://thirdweb.com/create-api-key) ### Starter kit If you want to get started quickly run: ```bash npx thirdweb create app --react-native ``` or clone the [expo-starter](https://github.com/thirdweb-dev/expo-starter) repo using git. [GitHubExpo + thirdweb starter repo](https://github.com/thirdweb-dev/expo-starter) ### Usage ## Getting Started #### Automatic Installation We recommend starting a new thirdweb React Native project using our CLI, which sets up everything automatically for you. In your CLI, run: ```bash npx thirdweb create app --react-native ``` or clone the [expo-starter](https://github.com/thirdweb-dev/expo-starter) repo using git. [GitHubExpo + thirdweb demo repo](https://github.com/thirdweb-dev/expo-starter) #### Manual Installation To manually install the React Native SDK, you'll need to install the `@thirdweb/react-native-adapter` package from npm on top of the `thirdweb` package. * #### Install the packages Using your favorite package manager or expo, install all the require dependencies ```bash npx expo install thirdweb @thirdweb-dev/react-native-adapter ``` Since react native requires installing native dependencies directly, you also have to install these required peer dependencies: ```bash npx expo install react-native-get-random-values @react-native-community/netinfo expo-application @react-native-async-storage/async-storage expo-web-browser expo-linking react-native-aes-gcm-crypto react-native-quick-crypto amazon-cognito-identity-js @coinbase/wallet-mobile-sdk react-native-mmkv react-native-svg @walletconnect/react-native-compat react-native-passkey ``` Here's an explanation of each peer dependency and why its needed: ```ts // needed for wallet connect react-native-get-random-values @react-native-community/netinfo expo-application // needed wallet connect + in-app wallet @react-native-async-storage/async-storage // needed for inapp wallet expo-web-browser // for oauth flows amazon-cognito-identity-js // for authentication react-native-aes-gcm-crypto // for encryption react-native-quick-crypto@0.7.0-rc.6 // for fast hashing // needed for coinbase wallet @coinbase/wallet-mobile-sdk react-native-mmkv // needed for UI components react-native-svg ``` * #### Edit your \`metro.config.js\` If you don't already have a `metro.config.file.js` in your project, you can create one by running: ```bash npx expo customize metro.config.js ``` Then, you need to add 2 properties to the metro resolver: `unstable_enablePackageExports` and `unstable_conditionNames`. This is to tell metro to resolve named `exports` properly. ```js // file: metro.config.js // Learn more https://docs.expo.io/guides/customizing-metro const { getDefaultConfig } = require("expo/metro-config"); /** @type {import('expo/metro-config').MetroConfig} */ const config = getDefaultConfig(__dirname); // ADD THESE 2 PROPERTIES config.resolver.unstable_enablePackageExports = true; config.resolver.unstable_conditionNames = [ "react-native", "browser", "require", ]; module.exports = config; ``` * #### Import \`@thirdweb-dev/react-native-adapter\` #### Without `expo-router` Simply import the package in the entrypoint of your app before any other import. This will polyfill all the required functionality needed. ```js // file: App.tsx // this needs to be imported before anything else import "@thirdweb-dev/react-native-adapter"; // ... the rest of your app ``` #### With `expo-router` If you're using `expo-router`, you need to polyfill before the router entry: ##### 1\. create a `index.js` Create an `index.js` file at the root of the repo. This will be the new entrypoint to your app, ensuring the polyfills happen before any routing. ```ts // file: index.js // this needs to be imported before expo-router import "@thirdweb-dev/react-native-adapter"; import "expo-router/entry"; ``` ##### 2\. Change your main entrypoint in `package.json` Now you can replace `expo-router/entry` with `./index.js` as your main entrypoint. ```ts // file: package.json "main": "./index.js", ``` #### Additional notes * `react-native-aes-gcm-crypto` requires `minSDK 26` for android, you can edit this in your `app.json` file. * You will get some warnings about unresolved exports, this is normal and will get better as the libraries get updated. * #### Run the development build You can run the development build using the Expo CLI, note that this needs to use the 'development build' option and not Expo Go. #### Expo Go Due to conflicts between Expo Go's wrapper and thirdweb's, **Expo Go is not currently supported**. When running your app, be sure to run a normal development build without using Expo Go. If the Expo CLI says "Using Expo Go" when starting the app, press `s` to switch to the development build. ![](https://i.ibb.co/JxyZzLn/Screenshot-2024-06-24-at-12-38-57-PM.png) Prebuild the app (only needed once): ```bash npx expo prebuild ``` Run the development build on ios: ```bash npx expo run:ios ``` Run the development build on android: ```bash npx expo run:android ``` * #### Use the \`thirdweb\` package normally Once all the setup above is all done, you can use the most of functionality in the `thirdweb` package out of the box, without having to do any react native specific code. This means that you can follow all the React documentation and expect it all to be exactly the same. Examples: ```tsx // import thirdweb hooks, extensions, provider and wallets as usual import { ThirdwebProvider } from "thirdweb/react"; import { balanceOf, claimTo } from "thirdweb/extensions/erc721"; import { inAppWallet } from "thirdweb/wallets/in-app"; ``` ## ADDRESS\_ZERO The zero address in Ethereum, represented as a hexadecimal string. `let ADDRESS_ZERO: "0x0000000000000000000000000000000000000000"; ` ## AcceptOfferParams `type AcceptOfferParams = GeneratedAcceptOfferParams; ` ## Connect Users to your Ecosystem Ecosystem wallets inherit all the functionality of [in-app wallets](https://portal.thirdweb.com/react/v5/in-app-wallet/get-started), but instead of being scoped to a single app, they can be used across multiple applications. Head over to the [thirdweb dashboard](https://thirdweb.com/team) to create an ecosystem and obtain your ecosystem id. ### Available auth methods * Email * Phone * Passkey * Guest * Wallet * Google * Apple * Facebook * X * Discord * Telegram * Twitch * Farcaster * Github * Line * Coinbase * Steam * Backend ### Live Playground Try out ecosystem wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/in-app-wallet/ecosystem) ### Configure ecosystem wallets The only difference with in-app wallets is how you create an ecosystem wallet using the `ecosystemWallet()` function and passing your ecosystem id. ```tsx import { ecosystemWallet } from "thirdweb/wallets"; const wallet = ecosystemWallet("ecosystem.your-ecosystem-id"); ``` ### Configuring auth strategies You can configure the allowed auth strategies on [your dashboard](https://thirdweb.com/team/~/~/ecosystem). ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsocial-config.74389cb5.png&w=3840&q=75) For prebuilt UIs, the enabled auth strategies are automatically read from your dashbaord configurations. For custom UIs, you can configure the auth options when connecting the wallet. See [using your own UI](#using-your-own-ui) for an example. #### Using disabled auth strategies Note that while you're allowed to pass any auth strategy today, we recommend only passing the strategies that are enabled on your dashboard. We might enforce this in the future. ### Passing a partner ID For closed ecosystems, you can invite partners to your ecosystem. Partners will have to pass a valid `partnerId` to the `ecosystemWallet()` function in order to connect to your ecosystem. ```tsx const wallet = ecosystemWallet("ecosystem.your-ecosystem-id", { partnerId: "your-partner-id", }); ``` For more information, refer to the [ecosystemWallet API reference](https://portal.thirdweb.com/references/typescript/v5/ecosystemWallet). ### Using ecosystem wallets Refer to the [in-app wallets](https://portal.thirdweb.com/react/v5/in-app-wallet/get-started) documentation to add your ecosystem wallet to the connect UI components or build your own UI. ## AddressInput `type AddressInput = string; ` ## Address `` type Address = `0x${string}`; `` ## BASENAME\_RESOLVER\_ADDRESS `let BASENAME_RESOLVER_ADDRESS: "0xC6d566A56A1aFf6508b41f6c90ff131615583BCD"; ` ## BASE\_SEPOLIA\_BASENAME\_RESOLVER\_ADDRESS `let BASE_SEPOLIA_BASENAME_RESOLVER_ADDRESS: "0x6533C94869D28fAA8dF77cc63f9e2b2D6Cf77eBA"; ` ## BoolToBytesOpts `type BoolToBytesOpts = ox__Bytes.fromBoolean.Options; ` ## BoolToHexOpts `type BoolToHexOpts = ox__Hex.fromBoolean.Options; ` ## BytesToBoolOpts `type BytesToBoolOpts = ox__Bytes.toBoolean.Options; ` ## BytesToNumberOpts `type BytesToNumberOpts = [BytesToBigIntOpts](https://portal.thirdweb.com/references/typescript/v5/BytesToBigIntOpts); ` ## BytesToStringOpts `type BytesToStringOpts = ox__Bytes.toString.Options; ` ## Chain `type Chain = Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## ConnectionManager `type ConnectionManager = ReturnType; ` ## ConnectionStatus `type ConnectionStatus = | "connected" | "disconnected" | "connecting" | "unknown"; ` ## CoreType `type CoreType = "ERC20" | "ERC721" | "ERC1155"; ` ## DeepLinkSupportedWalletCreationOptions `type DeepLinkSupportedWalletCreationOptions = | { preferDeepLink?: boolean } | undefined; ` ## DEFAULT\_ACCOUNT\_FACTORY\_V0\_6 `let DEFAULT_ACCOUNT_FACTORY_V0_6: "0x85e23b94e7F5E9cC1fF78BCe78cfb15B81f0DF00"; ` ## DEFAULT\_ACCOUNT\_FACTORY\_V0\_7 `let DEFAULT_ACCOUNT_FACTORY_V0_7: "0x4be0ddfebca9a5a4a617dee4dece99e7c862dceb"; ` ## DeployPackContractOptions `type DeployPackContractOptions = Prettify< ClientAndChainAndAccount & { params: [PackContractParams](https://portal.thirdweb.com/references/typescript/v5/PackContractParams) } >; ` ## DeploySplitContractOptions `type DeploySplitContractOptions = Prettify< ClientAndChainAndAccount & { params: [SplitContractParams](https://portal.thirdweb.com/references/typescript/v5/SplitContractParams) } >; ` ## DepositParams `type DepositParams = { amount: string } | { amountWei: bigint }; ` ## DownloadOptions `type DownloadOptions = Prettify< [ResolveSchemeOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveSchemeOptions) & { requestTimeoutMs?: number } >; ` ## ENTRYPOINT\_ADDRESS\_v0\_6 `let ENTRYPOINT_ADDRESS_v0_6: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"; ` ## ENTRYPOINT\_ADDRESS\_v0\_7 `let ENTRYPOINT_ADDRESS_v0_7: "0x0000000071727De22E5E9d8BAf0edAc6f37da032"; ` ## ERC1155ContractType `type ERC1155ContractType = "DropERC1155" | "TokenERC1155"; ` ## ERC20ContractType `type ERC20ContractType = "DropERC20" | "TokenERC20"; ` ## ERC721ContractType `type ERC721ContractType = | "DropERC721" | "TokenERC721" | "OpenEditionERC721" | "LoyaltyCard"; ` ## ERC7579Config `type ERC7579Config = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) & { factoryAddress: string; validatorAddress: string; }; ` ## EcosystemWalletConnectionOptions `type EcosystemWalletConnectionOptions = [InAppWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletConnectionOptions); ` ## EcosystemWalletAutoConnectOptions `type EcosystemWalletAutoConnectOptions = [InAppWalletAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletAutoConnectOptions); ` ## EstimateGasResult `type EstimateGasResult = bigint; ` ## FetchDeployMetadataResult `type FetchDeployMetadataResult = Partial<[ExtendedMetadata](https://portal.thirdweb.com/references/typescript/v5/ExtendedMetadata)> & CompilerMetadata; ` ## GetActiveClaimConditionParams `type GetActiveClaimConditionParams = GetActiveClaimConditionIdParams; ` ## GetAuctionParams `type GetAuctionParams = GetAuction.GetAuctionParams; ` ## GetCapabilitiesResult `type GetCapabilitiesResult = Prettify< [WalletCapabilitiesRecord](https://portal.thirdweb.com/references/typescript/v5/WalletCapabilitiesRecord)<[WalletCapabilities](https://portal.thirdweb.com/references/typescript/v5/WalletCapabilities), number> >; ` ## GetListingParams `type GetListingParams = GetListing.GetListingParams; ` ## GetNFTParams Parameters for getting an NFT. `type GetNFTParams = Prettify< [TokenURIParams](https://portal.thirdweb.com/references/typescript/v5/TokenURIParams) & { includeOwner?: boolean; tokenByIndex?: boolean } >; ` ## GetOfferParams `type GetOfferParams = GetOfferParamsGenerated; ` ## GetOwnedNFTsParams Parameters for retrieving NFTs. `type GetOwnedNFTsParams = [GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams); ` ## GetOwnedTokenIdsParams `type GetOwnedTokenIdsParams = [BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams); ` ## GetOwnedNFTsParams `type GetOwnedNFTsParams = [GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams); ` ## GetWinningBidParams `type GetWinningBidParams = GetWinningBid.GetWinningBidParams; ` ## Hex `type Hex = ox__Hex.Hex; ` ## HexToBigIntOpts `type HexToBigIntOpts = ox__Hex.toBigInt.Options; ` ## HexToBoolOpts `type HexToBoolOpts = ox__Hex.toBoolean.Options; ` ## HexToBytesOpts `type HexToBytesOpts = ox__Bytes.fromHex.Options; ` ## HexToNumberOpts `type HexToNumberOpts = [HexToBigIntOpts](https://portal.thirdweb.com/references/typescript/v5/HexToBigIntOpts); ` ## HexToStringOpts `type HexToStringOpts = ox__Hex.toString.Options; ` ## HexToUint8ArrayOpts `type HexToUint8ArrayOpts = ox__Hex.toBytes.Options; ` ## ID\_REGISTRY\_ADDRESS `let ID_REGISTRY_ADDRESS: "0x00000000Fc6c5F01Fc30151999387Bb99A9f489b"; ` ## InAppWalletAuth `type InAppWalletAuth = AuthOption; ` ## InAppWalletSocialAuth `type InAppWalletSocialAuth = SocialAuthOption; ` ## IsHexOptions `type IsHexOptions = ox__Hex.assert.Options; ` ## LENS\_COLLECT\_NFT\_ADDRESS\_TESTNET `let LENS_COLLECT_NFT_ADDRESS_TESTNET: "0x0c2a7761E2971D906338F5da1ecF0027E4247fd7"; ` ## KEY\_GATEWAY\_ADDRESS `let KEY_GATEWAY_ADDRESS: "0x00000000fC56947c7E7183f8Ca4B62398CaAdf0B"; ` ## LENS\_COLLECT\_NFT\_ADDRESS `let LENS_COLLECT_NFT_ADDRESS: "0x0c2a7761E2971D906338F5da1ecF0027E4247fd7"; ` ## LENS\_FOLLOW\_NFT\_ADDRESS `let LENS_FOLLOW_NFT_ADDRESS: "0x288715E67B7b184fD299143280CA6c1Eb7F31e1B"; ` ## LENS\_FOLLOW\_NFT\_ADDRESS\_TESTNET `let LENS_FOLLOW_NFT_ADDRESS_TESTNET: "0x288715E67B7b184fD299143280CA6c1Eb7F31e1B"; ` ## LENS\_HANDLE\_ADDRESS `let LENS_HANDLE_ADDRESS: "0xe7E7EaD361f3AaCD73A61A9bD6C10cA17F38E945"; ` ## LENS\_HUB\_ADDRESS List of Lens's contracts on both polygon mainnet and polygon amoy testnet Update to the latest data here: https://www.lens.xyz/docs/resources/smart-contracts In our Lens extensions we will default to using these hard-coded values on mainnet to simplify the code for users, however they can override anytime `let LENS_HUB_ADDRESS: "0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d"; ` ## LENS\_HANDLE\_ADDRESS\_TESTNET `let LENS_HANDLE_ADDRESS_TESTNET: "0xe7E7EaD361f3AaCD73A61A9bD6C10cA17F38E945"; ` ## LENS\_HUB\_ADDRESS\_TESTNET `let LENS_HUB_ADDRESS_TESTNET: "0xDb46d1Dc155634FbC732f92E853b10B288AD5a1d"; ` ## LENS\_MODULE\_REGISTRY\_ADDRESS `let LENS_MODULE_REGISTRY_ADDRESS: "0x1eD5983F0c883B96f7C35528a1e22EEA67DE3Ff9"; ` ## LENS\_MODULE\_REGISTRY\_ADDRESS\_TESTNET `let LENS_MODULE_REGISTRY_ADDRESS_TESTNET: "0x1eD5983F0c883B96f7C35528a1e22EEA67DE3Ff9"; ` ## LENS\_TOKEN\_HANDLE\_REGISTRY\_ADDRESS `let LENS_TOKEN_HANDLE_REGISTRY_ADDRESS: "0xD4F2F33680FCCb36748FA9831851643781608844"; ` ## LENS\_TOKEN\_HANDLE\_REGISTRY\_ADDRESS\_TESTNET `let LENS_TOKEN_HANDLE_REGISTRY_ADDRESS_TESTNET: "0xD4F2F33680FCCb36748FA9831851643781608844"; ` ## MintAdditionalSupplyToBatchParams `type MintAdditionalSupplyToBatchParams = WithOverrides<{ nfts: Array<[MintAdditionalSupplyToParams](https://portal.thirdweb.com/references/typescript/v5/MintAdditionalSupplyToParams)>; }>; ` ## MintToParams `type MintToParams = WithOverrides<{ nft: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; to: string; }>; ` ## ID\_GATEWAY\_ADDRESS `let ID_GATEWAY_ADDRESS: "0x00000000Fc25870C6eD6b6c7E41Fb078b7656f69"; ` ## MultiStepAuthArgsType `type MultiStepAuthArgsType = MultiStepAuthProviderType & { verificationCode: string; }; ` ## NATIVE\_TOKEN\_ADDRESS The address of the native token. `let NATIVE_TOKEN_ADDRESS: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"; ` ## NumberToHexOpts `type NumberToHexOpts = ox__Hex.fromNumber.Options; ` ## ParseErc6492SignatureReturnType `type ParseErc6492SignatureReturnType = OneOf< [Erc6492Signature](https://portal.thirdweb.com/references/typescript/v5/Erc6492Signature) | { signature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) } >; ` ## QuoteApprovalParams `type QuoteApprovalParams = [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams)>; ` ## ReleasableByTokenParams `type ReleasableByTokenParams = [ReleasableParams](https://portal.thirdweb.com/references/typescript/v5/ReleasableParams) & { tokenAddress: string; }; ` ## ReleaseByTokenParams `type ReleaseByTokenParams = [ReleaseParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseParams) & { tokenAddress: string }; ` ## ResetClaimEligibilityParams `type ResetClaimEligibilityParams = [GetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionsParams); ` ## STORAGE\_REGISTRY\_ADDRESS `let STORAGE_REGISTRY_ADDRESS: "0x00000000fcCe7f938e7aE6D3c335bD6a1a7c593D"; ` ## SIGNED\_KEY\_REQUEST\_VALIDATOR\_ADDRESS `let SIGNED_KEY_REQUEST_VALIDATOR_ADDRESS: "0x00000000FC700472606ED4fA22623Acf62c60553"; ` ## SendCallsResult `type SendCallsResult = [WalletSendCallsId](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsId); ` ## SetContractURIParams Represents the parameters for the "setContractURI" function. `type SetContractURIParams = WithOverrides<{ uri: AbiParameterToPrimitiveType<{ name: "_uri"; type: "string" }>; }>; ` ## SetContractMetadataParams `type SetContractMetadataParams = Record; ` ## SignedAuthorization Represents a signed EIP-7702 authorization object. `type SignedAuthorization = ox__Authorization.ListSigned[number]; ` ## SupportedTokens `type SupportedTokens = Record>; ` ## StringToHexOpts `type StringToHexOpts = ox__Hex.fromString.Options; ` ## TokenMintParams `type TokenMintParams = { to: string } & ( | { quantity: string } | { quantityWei: bigint } ); ` ## TokenPaymaster `let TokenPaymaster: Record; ` ## UD\_POLYGON\_MAINNET `let UD_POLYGON_MAINNET: "0xa9a6A3626993D487d2Dbda3173cf58cA1a9D9e9f"; ` ## Uint8ArrayToHexOpts `type Uint8ArrayToHexOpts = ox__Hex.fromBoolean.Options; ` ## UploadMobileOptions `type UploadMobileOptions = InternalUploadMobileOptions & { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ## UploadMetadataParams `type UploadMetadataParams = CommonUploadMetadataParams; ` ## UploadOptions `type UploadOptions> = InternalUploadOptions & { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ## VerifySignatureParams `type VerifySignatureParams = Prettify< [VerifyEOASignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyEOASignatureParams) & Partial<[VerifyContractWalletSignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyContractWalletSignatureParams)> >; ` ## WalletCapabilities `type WalletCapabilities = {}; ` ## WalletConnectClient `type WalletConnectClient = Awaited< ReturnType >; ` ## WalletEmitter `type WalletEmitter = Emitter< [WalletEmitterEvents](https://portal.thirdweb.com/references/typescript/v5/WalletEmitterEvents) >; ` ## WalletSendCallsId `type WalletSendCallsId = string; ` ## WalletUser `type WalletUser = UserStatus; ` ## abstract `let abstract: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## abstractTestnet `let abstractTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## anvil `let anvil: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## arbitrum `let arbitrum: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## arbitrumSepolia `let arbitrumSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## arbitrumNova `let arbitrumNova: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## assetChainTestnet `let assetChainTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## astriaEvmDusknet `let astriaEvmDusknet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## avalanche `let avalanche: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## avalancheFuji `let avalancheFuji: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## baseSepolia `let baseSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## base `let base: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## blast `let blast: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## blastSepolia `let blastSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## bsc `let bsc: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## bscTestnet `let bscTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## celo `let celo: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## celoAlfajoresTestnet `let celoAlfajoresTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## cronos `let cronos: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## defaultTokens Default tokens shown in [ConnectButton](https://portal.thirdweb.com/react/v4/components/ConnectButton) 's SendFunds screen for each network. You can use the default tokens as a starting point for your own list of tokens and override tokens for specific networks. `let defaultTokens: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); ` ## degen `let degen: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## ethereum `let ethereum: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## fantom `let fantom: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## fantomTestnet `let fantomTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## fraxtalTestnet `let fraxtalTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## frameTestnet `let frameTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## gnosisChiadoTestnet `let gnosisChiadoTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## gnosis `let gnosis: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## godWoken `let godWoken: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## godWokenTestnetV1 `let godWokenTestnetV1: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## hardhat `let hardhat: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## hokumTestnet `let hokumTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## linea `let linea: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## lineaSepolia `let lineaSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## localhost `let localhost: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## loot `let loot: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## mantaPacific `let mantaPacific: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## mainnet `let mainnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## mantaPacificTestnet `let mantaPacificTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## maxUint256 `let maxUint256: bigint; ` ## metalL2Testnet `let metalL2Testnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## mode `let mode: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## modeTestnet `let modeTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## moonbeam `let moonbeam: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## mumbai `let mumbai: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## optimism `let optimism: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## optimismSepolia `let optimismSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## palm `let palm: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## palmTestnet `let palmTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## polygon `let polygon: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## polygonAmoy `let polygonAmoy: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## polygonMumbai `let polygonMumbai: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## polygonZkEvmTestnet `let polygonZkEvmTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## polygonZkEvm `let polygonZkEvm: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## rari `let rari: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## rariTestnet `let rariTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## scrollAlphaTestnet `let scrollAlphaTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## scroll `let scroll: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## scrollSepoliaTestnet `let scrollSepoliaTestnet: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## sepolia `let sepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## soneiumMinato `let soneiumMinato: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## treasure `let treasure: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## treasureTopaz `let treasureTopaz: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## zkCandySepolia `let zkCandySepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## xaiSepolia `let xaiSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## zkSync `let zkSync: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## xai `let xai: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## zkSyncSepolia `let zkSyncSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## zora `let zora: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## TypeScript SDK Reference ## zoraSepolia `let zoraSepolia: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ## Batching transactions Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful. ```tsx import { smartWallet } from "thirdweb/wallets"; import { sendBatchTransaction } from "thirdweb"; import { approve, transferFrom } from "thirdweb/extensions/erc20"; const smartWallet = new smartWallet(config); const smartAccount = await smartWallet.connect({ client, personalAccount, }); const transactions = [ approve({ contract, spender: "0x...", value: 100, }), transferFrom({ contract, from: "0x...", to: "0x...", amount: 100, }), ]; await sendBatchTransaction({ transactions, account: smartAccount, }); ``` ## Account Permissions & Session Keys All of the account contracts - [Simple](https://thirdweb.com/thirdweb.eth/AccountFactory) and [Managed](https://thirdweb.com/thirdweb.eth/ManagedAccountFactory) \- share the same permission model. In this section, we'll describe this permission model in detail. An account recognizes only two types of actors: _Session Keys_ and _Admins_. ### 1\. Admins Admins have **unrestricted access** to the account; call any functions on the contract, use the contract without going through the ERC-4337 infrastructure (bundlers, EntryPoint, etc.), withdraw the account's native token balance, and so on. #### Assigning Admin Permissions Existing admins on the account can add new admins, remove existing admins or renounce their own admin status. ```typescript import { addAdmin } from "thirdweb/extensions/erc4337"; import { smartWallet } from "thirdweb/wallets"; import { sendTransaction, getContract } from "thirdweb"; const smartWallet = new smartWallet(config); const smartAccount = await smartWallet.connect({ client, personalAccount, }); const transaction = addAdmin({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, adminAddress: "0x...", // the address of the new admin }); await sendTransaction({ transaction, account: smartAccount, }); ``` ### 2\. Session Keys Session Keys are additional authorized signers that must go through ERC-4337 infrastructure (bundlers, EntryPoint, etc.) to use an account to execute transactions. Session keys can use an account under certain restrictions. #### Assigning Session Key Permissions Each individual session key has its own permissions to use the account. Only admins can set the permissions for session keys. Session keys can be assigned the following permissions: * \[Required\] Allow interaction with specific contracts with the account ("\*" for any contracts) * \[Optional\] Have a maximum amount of native tokens that can be transferred per transaction (defaults to 0 eth, transactions with value will be rejected) * \[Optional\] Have access to the account only during a specific time window (defaults to 10 years from now) ```ts import { addAdmin } from "thirdweb/extensions/erc4337"; import { smartWallet } from "thirdweb/wallets"; import { sendTransaction, getContract } from "thirdweb"; const smartWallet = new smartWallet(config); const smartAccount = await smartWallet.connect({ client, personalAccount, }); const transaction = addSessionKey({ contract: getContract({ address: smartAccount.address, chain, client, }), account: smartAccount, sessionKeyAddress: "0x...", // the address of the new session key permissions: { approvedTargets: "*", // the addresses of allowed contracts, or '*' for any contract nativeTokenLimitPerTransaction: 0.1, // the maximum amount of native token (in ETH) that the session key can spend per transaction permissionStartTimestamp: new Date(), // the date when the session key becomes active permissionEndTimestamp: new Date( Date.now() + 24 * 60 * 60 * 1000, ), // the date when the session key expires }, }); await sendTransaction({ transaction, account: smartAccount, }); ``` ## Using Account abstraction in Typescript By using the [TypeScript SDK](https://portal.thirdweb.com/typescript/v5), you can use smart accounts in your applications easily. ### Example Use Cases The wallet SDK with the TypeScript SDK is primarily used when creating a backend for your application or when creating a node script. In this guide, we will be using the wallet SDK to create a Node script but the logic for creating a backend is the same. If you are working in a React environment, you are recommended to follow [this guide](https://portal.thirdweb.com/connect/account-abstraction/guides/react). * #### Create an API key To use the bundler and paymaster, you must create an API key and a billing account. To create an API Key: * Head to the settings page in the dashboard and click the **API Keys** tab. * Click on **Create API Key**. * Follow the steps to create your API key. To use account abstraction infrastructure on mainnet you will also need to [create an account and add a payment method](https://thirdweb.com/team/~/~/settings/billing). * #### Create a Node Script To use smart accounts in a node script, simply create a new Node.js project and install the `thirdweb` package. ```bash npm i thirdweb ``` Create a `.env` file and add the following: ```bash THIRDWEB_SECRET_KEY= PRIVATE_KEY= ``` Create an `index.ts` file where we'll write our script. * #### Creating the Personal Wallet Key This smart account is unlocked by a 'key' - a personal wallet. This key can be anything from a MetaMask wallet or an In-App Wallet or just a private key and is used as a way to 'sign in' to the smart account. To create a personal wallet key, we are going to use the [privateKeyAccount](https://portal.thirdweb.com/references/typescript/v5/privateKeyAccount), which we need to import from the `thirdweb/wallets` package. ```typescript import { createThirdwebClient } from "thirdweb"; import { privateKeyAccount } from "thirdweb/wallets"; const client = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY as string, }); const personalAccount = privateKeyAccount({ client, privateKey: process.env.PRIVATE_KEY as string, }); console.log("Personal account address:", personalAccount.address); ``` * #### Creating the Smart account Now, let's create a smart account using `smartWallet` from `thirdweb/wallets` package. To do this, we need to pass an object of type [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) to the function. Some of the important properties in this object are: * `chain`: the chain that the smart account will be deployed on. * `sponsorGas`: whether the smart account should have sponsored transactions or not. Once we have created the smart wallet interface, we can connect the personal wallet to the smart account using the `connect` method. ```typescript import { smartWallet } from "thirdweb/wallets"; // Configure the smart wallet const wallet = smartWallet({ chain: sepolia, sponsorGas: true, }); // Connect the smart wallet const smartAccount = await wallet.connect({ client, personalAccount, }); ``` * #### Using the Smart Account Now that we have created a smart account object and connected it, we can use it to perform onchain actions gaslessly. In this example, we will claim a NFT using the `claimTo` method and then send the transaction using the `sendTransaction` method. ```typescript const balance = await getWalletBalance({ client, chain, address: smartAccount.address, }); console.log("Smart account balance:", balance.displayValue); const contract = getContract({ client, chain: sepolia, address: "0x...", // deploy a drop contract from thirdweb.com/explore }); const transaction = await claimTo({ contract, to: smartAccount.address, quantity: 1, }); const { transactionHash } = await sendTransaction({ transaction, smartAccount, }); console.log(`Minted NFT with transaction hash: ${transactionHash}`); ``` We have also passed our `secretKey` to the SDK so that we can use the bundler and paymaster. We have also added some helpful logs to view the smart account address and balance using the associated `balance` and `getAddress` methods. * #### Run the Script To run the script, run the following command: ```bash bun index.ts ``` As you can see in the terminal output, upon claiming the token, the smart account is deployed. This is because smart account contracts are deployed when the first transaction is initiated. We have successfully deployed a smart account and claimed an ERC20 token! * #### Conclusion In this guide, we have learned how to use the wallet SDK with the TypeScript SDK to create a smart account and claim an NFT. ## Chain The thirdweb SDK works with **any EVM chain**. All you need to connect a chain is its chain id. RPC connection to the chain is handled for you. ```ts import { defineChain } from "thirdweb"; const myChain = defineChain(myChainId); ``` The SDK comes with predefined popular chains like `base`, `polygon`, and more exported from the `thirdweb/chains` entrypoint. ```ts import { polygon } from "thirdweb/chains"; const myChain = polygon; ``` #### Configuring chains (Advanced) You can also configure chains with custom RPC endpoints, native currency, block explorers, and more. ```ts const myChain = defineChain({ id: myChainId, rpc: "https://my-custom-rpc.com", ... }) ``` ## Adapters The thirdweb SDK can work side by side with: * any wallet that supports EIP1193 * ethers.js v5 * ethers.js v6 * viem * older versions of the @thirdweb-dev/sdk (using the ethers.js v5 adapter) Adapters allow you to use contracts, providers and wallets from these libraries with the thirdweb SDK and vice versa. ### EIP1193 You can use any wallet that supports EIP1193 with the thirdweb SDK by converting it using `EIP1193.fromProvider`: ```ts import { EIP1193 } from "thirdweb/wallets"; // Create a Thirdweb wallet from a EIP1193 provider const wallet = EIP1193.fromProvider({ provider: yourProvider, // any EIP1193 provider }); // Use like any other Thirdweb wallet const account = await wallet.connect({ client: createThirdwebClient({ clientId: "..." }), }); // Sign messages await account.signMessage({ message: "Hello World" }); ``` You can also convert a thirdweb account to an EIP1193 provider using `EIP1193.toProvider`, which can then be used with other libraries: ```ts import { EIP1193 } from "thirdweb/wallets"; // Create an EIP-1193 provider from a Thirdweb wallet const provider = EIP1193.toProvider({ wallet, chain: ethereum, client: createThirdwebClient({ clientId: "..." }), }); // Use with any EIP-1193 compatible library const accounts = await provider.request({ method: "eth_requestAccounts", }); ``` ### viem You can use an existing wallet client from viem with the thirdweb SDK by converting it using the `viemAdapter`: ```ts import { viemAdapter } from "thirdweb/adapters/viem"; // convert a viem wallet client to a thirdweb wallet const walletClient = createWalletClient(...); const thirdwebWallet = await viemAdapter.wallet.fromViem({ walletClient, }); // convert a thirdweb account to viem wallet client const viemClientWallet = viemAdapter.wallet.toViem({ client, chain, wallet, }); ``` You can also convert viem public clients and contracts from and to the thirdweb SDK. View the [viemAdapter](https://portal.thirdweb.com/references/typescript/v5/viemAdapter) reference for more details. ### Ethers v6 You can use an existing ethers.js v6 Signer with the thirdweb SDK by converting it using the `ethers6Adapter`: ```ts import { ethers6Adapter } from "thirdweb/adapters/ethers6"; import { sendTransaction } from "thirdweb"; // convert a ethers signer const signer: ethers.Signer = ...; const account = await ethers6Adapter.signer.fromEthers({ signer, }); // use it with the thirdweb SDK await sendTransaction({ transaction, account, }); ``` Similarly, you can use any wallets created with the thirdweb SDK with ethers.js v6 by converting them using the `ethers6Adapter`: ```ts import { ethers6Adapter } from "thirdweb/adapters/ethers6"; import { createThirdwebClient, inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; const client = createThirdwebClient({ clientId }); const wallet = inAppWallet(); const chain = sepolia; const account = await wallet.connect({ client, strategy: "google", }); // convert a thirdweb account to ethers signer const ethersSigner = await ethers6Adapter.signer.toEthers({ client, chain, account, }); ``` You can also convert ethers.js providers and contracts from and to the thirdweb SDK. View the [ethers6Adapter](https://portal.thirdweb.com/references/typescript/v5/ethers6Adapter) reference for more details. ### Ethers v5 You can use an existing ethers.js v5 Signer with the thirdweb SDK by converting it using the `ethers5Adapter`: ```ts import { ethers5Adapter } from "thirdweb/adapters/ethers5"; // convert an ethers signer to a thirdweb account const signer: ethers.Signer = ...; const account = await ethers5Adapter.signer.fromEthers({ signer, }); // convert a thirdweb account to ethers signer const ethersSigner = await ethers5Adapter.signer.toEthers({ client, chain, account }); ``` You can also convert ethers.js providers and contracts from and to the thirdweb SDK. View the [ethers5Adapter](https://portal.thirdweb.com/references/typescript/v5/ethers5Adapter) reference for more details. ## Auth Using [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) (Sign in with Ethererum) standard, you can authenticate users to your backend using only their wallet. This is a secure and easy way to authenticate users without requiring them to create an additional account. ### Usage #### Client Functions #### Auth with React If you're using React, Auth integrates directly with our built-in[ConnectButton component](https://portal.thirdweb.com/react/v5/ConnectButton). This handles things like caching, error handling, and retries for you. ```ts import { signLoginPayload } from 'thirdweb/auth'; // 1. fetch a login payload from your server const result = await fetch(...); const loginPayload = await result.json(); // 2. sign the login payload with the user's account const signature = await signLoginPayload({ payload: loginPayload, account }); // 3. send the login payload and signature to your server const result = await fetch(...); const verifiedPayload = await result.json(); ``` How you store and maintain a user session is up to you, but our recommended approach is to store a JWT token in a cookie that is verified on the server. The server functions below include utility functions to generate and verify the JWT. In order to generate and verify the JWT you will also need an EOA private key. This private key's wallet does not need to hold any funds, it is only used for signing. #### Server Functions ```ts import { createThirdwebClient } from "thirdweb"; import { createAuth } from "thirdweb/auth"; import { privateKeyToAccount } from "thirdweb/wallets"; const privateKey = process.env.THIRDWEB_PRIVATE_KEY; const thirdwebClient = createThirdwebClient({ secretKey: process.env.THIRDWEB_SECRET_KEY; }); const auth = createAuth({ domain: "localhost:3000", client: thirdwebClient, adminAccount: privateKeyToAccount({client, privateKey}) }); // 1. generate a login payload for a client on the server side const loginPayload = await auth.generatePayload({ address: "0x123..." }); // 2. send the login payload to the client to sign // 3. verify the login payload and signature that the client sends back later const verifiedPayload = await auth.verifyPayload({ payload: loginPayload, signature: "0x123...", }); // 4. generate a JWT for the client const jwt = await auth.generateJWT({ payload: verifiedPayload }); // 5. set the JWT as a cookie or otherwise provide it to the client // 6. authenticate the client based on the JWT on subsequent calls const { valid, parsedJWT } = await auth.verifyJWT({ jwt }); ``` ### Example Repos Auth + Next.js A working example of Auth + Next.js [GitHubView on GitHub](https://github.com/thirdweb-example/thirdweb-auth-next) Auth + Express A working example of a React + Express app using Auth [GitHubView on GitHub](https://github.com/thirdweb-example/thirdweb-auth-express) ## Client A client is the entry point to the thirdweb SDK. It is required for all other actions. #### Client ID You must provide a `clientId` or `secretKey` in order to initialize a client. You can create a client ID for free at[thirdweb.com/create-api-key](https://thirdweb.com/create-api-key). ### Create a client ##### For "client-side" usage ```ts import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ``` ##### For "server-side" usage ```ts import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ secretKey: "", }); ``` You will need to pass this client to other methods in the SDK. This will allow you to * get performant RPC to all chains * download/upload to IPFS * access Account Abstraction infrastructure (bundler, paymaster) * access other thirdweb services #### Getting your RPC URL If you need to access the raw RPC URL, just use thirdweb's default RPC format with your client ID `https://.rpc.thirdweb.com/`. ## Connecting Wallets The SDK supports 500+ wallets out of the box, all you need to pass is their id. These wallets include thirdweb's first-party wallets like Smart Wallet and In-App Wallet, as well as other popular wallet extensions/mobile apps. Refer to [createWallet](https://portal.thirdweb.com/references/typescript/v5/createWallet) and [injectedProvider](https://portal.thirdweb.com/references/typescript/v5/injectedProvider) for more information. ```tsx import { createThirdwebClient } from "thirdweb"; import { createWallet, injectedProvider } from "thirdweb/wallets"; const client = createThirdwebClient({ clientId }); const metamask = createWallet("io.metamask"); // pass the wallet id // if user has metamask installed, connect to it if (injectedProvider("io.metamask")) { await metamask.connect({ client }); } // open wallet connect modal so user can scan the QR code and connect else { await metamask.connect({ client, walletConnect: { showQrModal: true }, }); } ``` ## Connect Users to your Ecosystem Ecosystem wallets inherit all the functionality of [in-app wallets](https://portal.thirdweb.com/references/typescript/v5/in-app-wallet), but instead of being scoped to a single app, they can be used across multiple applications. Head over to the [thirdweb dashboard](https://thirdweb.com/team) to create an ecosystem and obtain your ecosystem id. ### Available auth methods * Email * Phone * Passkey * Guest * Wallet * Google * Apple * Facebook * X * Discord * Telegram * Twitch * Farcaster * Github * Line * Coinbase * Steam * Backend ### Live Playground Try out ecosystem wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/in-app-wallet/ecosystem) ### Configure ecosystem wallets The only difference with in-app wallets is how you create an ecosystem wallet using the `ecosystemWallet()` function and passing your ecosystem id. ```tsx import { ecosystemWallet } from "thirdweb/wallets"; const wallet = ecosystemWallet("ecosystem.your-ecosystem-id"); ``` ### Configuring auth strategies You can configure the allowed auth strategies on [your dashboard](https://thirdweb.com/team/~/~/ecosystem). ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fsocial-config.74389cb5.png&w=3840&q=75) For prebuilt UIs, the enabled auth strategies are automatically read from your dashbaord configurations. For custom UIs, you can configure the auth options when connecting the wallet. See [using your own UI](#using-your-own-ui) for an example. #### Using disabled auth strategies Note that while you're allowed to pass any auth strategy today, we recommend only passing the strategies that are enabled on your dashboard. We might enforce this in the future. ### Passing a partner ID For closed ecosystems, you can invite partners to your ecosystem. Partners will have to pass a valid `partnerId` to the `ecosystemWallet()` function in order to connect to your ecosystem. ```tsx const wallet = ecosystemWallet("ecosystem.your-ecosystem-id", { partnerId: "your-partner-id", }); ``` For more information, refer to the [ecosystemWallet API reference](https://portal.thirdweb.com/references/typescript/v5/ecosystemWallet). ### Using ecosystem wallets Refer to the [in-app wallets](https://portal.thirdweb.com/references/typescript/v5/in-app-wallet) documentation to add your ecosystem wallet to your applications. ## Contract A "contract" is a wrapper around a smart contract that is deployed on a chain. It is what you use to create transactions and read contract state. ```ts import { getContract } from "thirdweb"; import { ethereum } from "thirdweb/chains"; // get a contract const contract = getContract({ // the client you have created via `createThirdwebClient()` client, // the chain the contract is deployed on chain: ethereum, // the contract's address address: "0x123...", // OPTIONAL: the contract's abi abi: [...], }); ``` Contracts defined this way are lightweight and can be exported as consts accross your application to read or write to it. ## Built-in extensions for common standards The SDK comes packed with a set of built-in extensions for common standards. These extensions are designed to make it easy to interact with popular contracts and protocols. They are available as part of the SDK and can be used in your application without any additional setup. | Standard | Import Path | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | | EIP1193 | [thirdweb/extensions/eip1193](https://portal.thirdweb.com/references/typescript/v5/functions#eip1193) | EIP1193 extensions | | DEPLOY | [thirdweb/extensions/deploy](https://portal.thirdweb.com/references/typescript/v5/functions#deploy) | DEPLOY extensions | | MARKETPLACE | [thirdweb/extensions/marketplace](https://portal.thirdweb.com/references/typescript/v5/functions#marketplace) | MARKETPLACE extensions | | AIRDROP | [thirdweb/extensions/airdrop](https://portal.thirdweb.com/references/typescript/v5/functions#airdrop) | AIRDROP extensions | | COMMON | [thirdweb/extensions/common](https://portal.thirdweb.com/references/typescript/v5/functions#common) | COMMON extensions | | ENS | [thirdweb/extensions/ens](https://portal.thirdweb.com/references/typescript/v5/functions#ens) | ENS extensions | | ERC1155 | [thirdweb/extensions/erc1155](https://portal.thirdweb.com/references/typescript/v5/functions#erc1155) | ERC1155 extensions | | ERC721 | [thirdweb/extensions/erc721](https://portal.thirdweb.com/references/typescript/v5/functions#erc721) | ERC721 extensions | | ERC1271 | [thirdweb/extensions/erc1271](https://portal.thirdweb.com/references/typescript/v5/functions#erc1271) | ERC1271 extensions | | ERC20 | [thirdweb/extensions/erc20](https://portal.thirdweb.com/references/typescript/v5/functions#erc20) | ERC20 extensions | | ERC4337 | [thirdweb/extensions/erc4337](https://portal.thirdweb.com/references/typescript/v5/functions#erc4337) | ERC4337 extensions | | ERC4626 | [thirdweb/extensions/erc4626](https://portal.thirdweb.com/references/typescript/v5/functions#erc4626) | ERC4626 extensions | | FARCASTER | [thirdweb/extensions/farcaster](https://portal.thirdweb.com/references/typescript/v5/functions#farcaster) | FARCASTER extensions | | LENS | [thirdweb/extensions/lens](https://portal.thirdweb.com/references/typescript/v5/functions#lens) | LENS extensions | | MULTICALL3 | [thirdweb/extensions/multicall3](https://portal.thirdweb.com/references/typescript/v5/functions#multicall3) | MULTICALL3 extensions | | PACK | [thirdweb/extensions/pack](https://portal.thirdweb.com/references/typescript/v5/functions#pack) | PACK extensions | | PERMISSIONS | [thirdweb/extensions/permissions](https://portal.thirdweb.com/references/typescript/v5/functions#permissions) | PERMISSIONS extensions | | SPLIT | [thirdweb/extensions/split](https://portal.thirdweb.com/references/typescript/v5/functions#split) | SPLIT extensions | | THIRDWEB | [thirdweb/extensions/thirdweb](https://portal.thirdweb.com/references/typescript/v5/functions#thirdweb) | THIRDWEB extensions | | thirdweb | [thirdweb/extensions/thirdweb](https://portal.thirdweb.com/references/typescript/v5/functions#thirdweb) | thirdweb extensions | | UNISWAP | [thirdweb/extensions/uniswap](https://portal.thirdweb.com/references/typescript/v5/functions#uniswap) | UNISWAP extensions | | UNSTOPPABLE-DOMAINS | [thirdweb/extensions/unstoppable-domains](https://portal.thirdweb.com/references/typescript/v5/functions#unstoppable-domains) | UNSTOPPABLE-DOMAINS extensions | | VOTE | [thirdweb/extensions/vote](https://portal.thirdweb.com/references/typescript/v5/functions#vote) | VOTE extensions | | MODULES | [thirdweb/extensions/modules](https://portal.thirdweb.com/references/typescript/v5/functions#modules) | MODULES extensions | | EIP5792 | [thirdweb/extensions/eip5792](https://portal.thirdweb.com/references/typescript/v5/functions#eip5792) | EIP5792 extensions | More extensions are being added regularly. Anyone can [create an extension](https://portal.thirdweb.com/typescript/v5/extensions/create) and contribute it back to the repository. You can also [generate extensions](https://portal.thirdweb.com/typescript/v5/extensions/generate) for any deployed contract. ## Writing your own extensions You can create your own extensions. They are just regular functions that pre-define the behavior of a `prepareContractCall()` or `readContract()` function. The goal of extensions is to add a layer of convenience to direct contract calls, either to simplify the inputs or to give richer outputs. #### Example: Creating the `getBalance` extension for ERC20 tokens The `erc20/getBalance` extension is a very convenient and efficient way to fetch all the information needed to display an ERC20 token balance to a user, a very common usecase for applications. Here is how it is implemented in the SDK. ```typescript // Define your extension function export function getBalance( // The base options include everything that is needed to interact with the contract, *except* the specific params for your function, in this case, "address" options: BaseTransactionOptions<{ address: string }>, ) { // The extension conveniently fetches all the relevant information from the contract to display a readable balance const [balanceWei, decimals_, symbol_, name_] = await Promise.all([ balanceOf(options), decimals(options), symbol(options), name(options), ]); return { value: balanceWei, decimals: decimals_, // The `toTokens` function converts the balance from wei to a human-readable format displayValue: toTokens(balanceWei, decimals_), symbol: symbol_, name: name_, }; } ``` #### Example: Creating the `mintTo` extension for ERC721 tokens The `erc721/mintTo` extension handles uploading the NFT metadata to IPFS before minting. Here is how it is implemented in the SDK. ```typescript import { prepareContractCall, type BaseTransactionOptions, } from "thirdweb"; // Define your extension function export function mintTo( // The base options include everything that is needed to interact with the contract, *except* the specific params for your function, in this case "to" and "nft" options: BaseTransactionOptions<{ to: string; nft: NFTMetadata }>, ) { return prepareContractCall({ // Pass the contract from the options contract: options.contract, // Pre-define the function to call on the smart contract method: "function mintTo(address to, string uri)", // The function params can be async params: async () => { // Upload the metadata to IPFS const tokenURI = (await upload({ client: options.contract.client, files: [options.nft], })[0]) as string; // return the contract params return [options.to, tokenURI] as const; }, }); } ``` ## Interacting with ENS ### Resolve an ENS name to an Ethereum address ```ts import { resolveAddress } from "thirdweb/extensions/ens"; const address = await resolveAddress({ client, name: "vitalik.eth", }); // Expected result: "0x..." ``` ### Resolve the primary name for a specified address ```ts import { resolveName } from "thirdweb/extensions/ens"; const name = await resolveName({ client, address: "0x1234...", }); // Expected result: "something.eth" ``` ### Resolve an ENS name to the avatar URL. ```ts import { resolveAvatar } from "thirdweb/extensions/ens"; const address = await resolveAvatar({ client, name: "vitalik.eth", }); // Expected result: An URL that points to the image of the ENS ``` ## Generating extensions You can generate precompiled, optimized extensions for any deployed contract using the thirdweb CLI. The thirdweb SDK comes with a CLI that can be run with your package manager of choice. ```bash npx thirdweb generate / ``` This will generate a new `thirdweb` directory in your own project, containing the precompiled extension for the contract at the given address. #### Example: Generating an extension for a USDC contract on Optimism ```bash npx thirdweb generate 10/0x0b2c639c533813f4aa9d7837caf62653d097ff85 ``` This will generate the following file `thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85.ts` in your project, containing: * Precompiled, type-safe event definitions * Precompiled, type-safe function definitions You can inspect the generated code, modify it, and use it in your project. #### Example: Using a generated extension function ```typescript import { permit } from "/thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85"; const contract = getContract({ client, chain: optimism, address: USDC_ADDRESS, }); // Type-safe function to do a permit transaction const transaction = permit({ owner: ..., spender: ..., value: ..., deadline: ..., signature: ..., }); await sendTransaction({ transaction, account }); ``` #### Example: Using a generated event ```typescript import { transferEvent } from "/thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85"; const contract = getContract({ client, chain: optimism, address: USDC_ADDRESS, }); // Type-safe event listener const events = await getContractEvents({ contract, events: [ transferEvent({ from: ..., to: ..., }) ], }); ``` ## Interacting with Lens protocol In Lens protocol, each profile is represented by an ERC721 token. In this particular context, the tokenId (of the ERC721 token) is the profileId. They can be used interchangably. ### Get Lens profile metadata from a profileId ```ts import { getProfileMetadata } from "thirdweb/extensions/lens"; const profileData = await getProfileMetadata({ profileId, client }); if (profileData) { console.log("Display name: ", profileData.lens.name); console.log("Bio: ", profileData.lens.bio); } ``` ### Get the owner's wallet address from their Lens handle ```ts import { resolveAddress } from "thirdweb/extensions/lens"; const walletAddress = await resolveAddress({ name: "vitalik", client, }); ``` ## Transfering (sending) tokens using thirdweb extensions ### ERC721 ```typescript import { safeTransferFrom } from "thirdweb/extensions/erc721"; import { sendAndConfirmTransaction } from "thirdweb"; const transaction = safeTransferFrom({ contract, // the erc721 contract from: "0x-wallet-address-of-owner", to: "0x-recipient-address", tokenId: 0n, // bigint - if you want to transfer tokenId #0, enter `0n` }); const transactionReceipt = await sendAndConfirmTransaction({ account, // the account initiating the transaction transaction, }); ``` ### ERC1155 ERC1155 works in a similar way. However you must specify the quantity that you want to transfer, and an optional data parameter. ```ts import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { sendAndConfirmTransaction } from "thirdweb"; const quantity = 1n; const optionalData = "0x"; const transaction = safeTransferFrom({ contract, // the erc1155 contract from: "0x...", // owner's wallet address to: "0x...", // recipient address tokenId: 0n, value: quantity, data: optionalData, }); const transactionReceipt = await sendAndConfirmTransaction({ account, // the account initiating the transaction transaction, }); ``` ### ERC20 ```ts import { transferFrom } from "thirdweb/extensions/erc20"; import { sendAndConfirmTransaction } from "thirdweb"; const transaction = transferFrom({ contract, // the erc20 contract from: "0x...", // owner's wallet address to: "0x...", // recipient address amount: 10n, // sending 10 tokens // Alternatively, you can use `amountWei` if you prefer to use the value in wei // amountWei: 10000000000000000000n, // assuming a decimals of 18 }); ``` ## Using extensions ### What are extensions? Extensions are the most convenient way to interact with contracts and protocols. They are precompiled, type-safe and highly optimized implementations of common standards such as ERC20, ERC721, ERC1155, etc. They can be handwritten to provide an easier API, sometimes combining multiple contract calls into one convenient function. They can also be generated from any deployed contract using a [simple CLI command](https://portal.thirdweb.com/typescript/v5/extensions/generate). To use an extension, you just need to import it and call it with the necessary parameters. #### Example: `getOwned()` extension for ERC1155 tokens This read extension handles fetching all the tokens owned by an address. Under the hood, this combines multiple contract calls. ```typescript import { getContract } from "thirdweb"; import { getOwnedNFTs } from "thirdweb/extensions/erc1155"; // get the contract const contract = getContract({...}); // since this is a read extension, we can just await the result const ownedNFTs = await getOwnedNFTs({ contract, address: "0x5678...", }); ``` #### Example: `mintTo()` extension for ERC721 tokens This extension handles uploading metadata to IPFS before minting an ERC721 token. ```typescript import { getContract } from "thirdweb"; import { mintTo } from "thirdweb/extensions/erc721"; // get the contract const contract = getContract({...}); // call the extension function to prepare the transaction const transaction = mintTo({ contract, to: "0x5678...", nft: { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, }); // Send the transaction const transactionResult = await sendTransaction({ transaction, account, }); ``` #### Example: `transfer()` extension for ERC20 tokens This extension conveniently handles unit conversion when transfering ERC20 tokens. You can pass the amount in tokens, the extension will convert it to the right unit before calling the contract. ```typescript import { getContract, sendTransaction } from "thirdweb"; import { transfer } from "thirdweb/extensions/erc20"; // get the contract const contract = getContract({...}); // Call the extension function to prepare the transaction const transaction = transfer({ contract, to: "0x1234...", amount: "0.01", }); // Send the transaction const transactionResult = await sendTransaction({ transaction, account, }); ``` ## Getting Started In this quickstart guide, we'll create a basic script to generate a wallet using a private key and send a transaction. We’ll assume you already have a TypeScript project created. * #### Install the SDK To get started, install the thirdweb SDK using your preferred package manager. npmyarnpnpmbun `npm i thirdweb ` * #### Create a thirdweb client Get a client id from by creating a new project and add it to your `.env`. ```bash THIRDWEB_SECRET_KEY=[YOUR SECRET KEY] WALLET_PRIVATE_KEY=[YOUR WALLET PRIVATE KEY] ``` Create a thirdweb client in your script. ```ts import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ // use `secretKey` for server side or script usage secretKey: process.env.THIRDWEB_SECRET_KEY, }); ``` #### Client Id vs Secret Key Client Id is used for **client side usage** and is restricted by the domain restrictions you set on your API key, it is a public identifier which can be used on the frontend safely. Secret key is used for **server side or script usage** and is not restricted by the domain restrictions. Never expose your secret key in client side code. * #### Read Contract State A client is all you need to start reading blockchain data. * Import the extensions you want to use. * Define a contract with `getContract` at a given address and chain. * Call the extension function to read the data. ```ts import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; // 1. import the extension you want to use import { getOwnedNFTs } from "thirdweb/extensions/erc1155"; // 2. get the contract const contract = getContract({ client, address: "0x1234...", chain: sepolia, }); // 3. call the extension function const ownedNFTs = await getOwnedNFTs({ contract, address: "0x1234...", }); console.log(ownedNFTs); ``` * #### Generate a wallet from a private key To perform transactions from your script, you'll need an account. You can generate a wallet from a private key using the `privateKeyToAccount` function. ```ts import { privateKeyToAccount } from "thirdweb/wallets"; const account = privateKeyToAccount({ client, privateKey: process.env.PRIVATE_KEY, }); // Get the address of the account const address = account.address; console.log("Connected as", address); ``` * #### Read Wallet Data Let's read balance of the account you just created, you'll need funds to perform transactions. ```ts import { getWalletBalance } from "thirdweb/wallets"; // Get the balance of the account const balance = await getWalletBalance({ account, chain: sepolia, }); console.log("Balance:", balance.displayValue, balance.symbol); ``` * #### Send a transaction With the account created and funded, you can now send a transaction. * Import the extension you want to use. * Define a contract with `getContract` at a given address and chain. * Call the extension function to prepare the transaction. * Send the transaction. ```ts import { getContract, sendTransaction } from "thirdweb"; // 1. Import the extension you want to use import { transfer } from "thirdweb/extensions/erc20"; // 2. Define the contract const contract = getContract({ client, address: "0x1234...", chain: sepolia, }); // 3. Call the extension function to prepare the transaction const transaction = transfer({ contract, to: "0x1234...", amount: "0.01", }); // 4. Send the transaction const result = await sendTransaction({ transaction, account, }); console.log("Transaction hash:", result.transactionHash); ``` You can also call generic contract functions using the `prepareContractCall` function by just specifying the solidity method signature you want to call. The arguments will be automatically inferred based on the method signature. ```ts import { getContract, prepareContractCall, sendTransaction, } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { toWei } from "thirdweb/utils"; // 1. Define the contract const contract = getContract({ client, address: "0x1234...", chain: sepolia, }); // 2. Prepare the transaction const transaction = prepareContractCall({ contract, // Pass the method signature that you want to call method: "function mintTo(address to, uint256 amount)", // and the params for that method // Their types are automatically inferred based on the method signature params: ["0x123...", toWei("100")], }); // 3. Send the transaction const result = await sendTransaction({ transaction, account, }); console.log("Transaction hash:", result.transactionHash); ``` * #### Conclusion You've now learned the basics of how to use the thirdweb SDK to read and write to the blockchain. You can now start building your own applications and explore the full potential of the SDK. [View the full SDK reference](https://portal.thirdweb.com/references/typescript/v5). ## Extensions ### What are extensions? Extensions are the most convenient way to interact with contracts and protocols. They are precompiled, type-safe and highly optimized implementations of common standards such as ERC20, ERC721, ERC1155, etc. They can be handwritten to provide an easier API, sometimes combining multiple contract calls into one convenient function. They can also be generated from any deployed contract using a [simple CLI command](https://portal.thirdweb.com/typescript/v5/extensions/generate). ## Built-in modules The SDK comes packed with a set of built-in modules for convenient use. Note that you can also create your own modules. | Module Name | | --------------------------------------------------------------------------------------------------------------------- | | [BatchMetadataERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#batchmetadataerc1155) | | [BatchMetadataERC721](https://portal.thirdweb.com/references/typescript/v5/functions#batchmetadataerc721) | | [ClaimableERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#claimableerc1155) | | [ClaimableERC20](https://portal.thirdweb.com/references/typescript/v5/functions#claimableerc20) | | [ClaimableERC721](https://portal.thirdweb.com/references/typescript/v5/functions#claimableerc721) | | [MintableERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#mintableerc1155) | | [MintableERC20](https://portal.thirdweb.com/references/typescript/v5/functions#mintableerc20) | | [MintableERC721](https://portal.thirdweb.com/references/typescript/v5/functions#mintableerc721) | | [OpenEditionMetadataERC721](https://portal.thirdweb.com/references/typescript/v5/functions#openeditionmetadataerc721) | | [RoyaltyERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#royaltyerc1155) | | [RoyaltyERC721](https://portal.thirdweb.com/references/typescript/v5/functions#royaltyerc721) | | [SequentialTokenIdERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#sequentialtokeniderc1155) | | [TransferableERC1155](https://portal.thirdweb.com/references/typescript/v5/functions#transferableerc1155) | | [TransferableERC20](https://portal.thirdweb.com/references/typescript/v5/functions#transferableerc20) | | [TransferableERC721](https://portal.thirdweb.com/references/typescript/v5/functions#transferableerc721) | More modules are being added regularly. You can also [create your own modules](https://portal.thirdweb.com/contracts/modular-contracts/get-started/create-module-contract). ## In-App Wallets Create in-app wallet for your users based on their email, phone, passkey, social auth or even their external wallets. These wallets are scoped by your clientId and do not require any confirmation to sign transactions. ### Available auth methods * Email * Phone * Passkey * Guest * Wallet * Google * Apple * Facebook * X * Discord * Telegram * Twitch * Farcaster * Github * Line * Coinbase * Steam * Backend ### Live Playground Try out in-app wallets for yourself in the [in-app wallet live playground](https://playground.thirdweb.com/connect/in-app-wallet) ### Configure in-app wallets The simplest way to create an in-app wallet is to use the `inAppWallet()` function. By default, this will create a wallet that supports email/password login, Google, Apple, Facebook login, and passkey. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); ``` You can also customize the wallet by passing in options. ```tsx import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ auth: { mode, // options are "popup" | "redirect" | "window"; options, // ex: ["discord", "farcaster", "apple", "facebook", "google", "passkey"], passkeyDomain, // for passkey, the domain that the passkey is created on redirectUrl, // the URL to redirect to after authentication }, metadata, // metadata for the wallet (name, icon, etc.) smartAccount, // smart account options for the wallet (for gasless tx) }); ``` [View all in-app wallet options](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions). Once created, you can use it either with the prebuilt UI components, or with your own UI. ### Usage ```tsx import { ThirdwebProvider, ConnectButton } from "thirdweb/react"; import { inAppWallet } from "thirdweb/wallets"; const client = createThirdwebClient({ clientId }); const wallet = inAppWallet(); const account = await wallet.connect({ client, strategy: "google", }); console.log("connected as", account.address); ``` ### API Reference View all the auth and configuration options for in-app wallets in the [API Reference](https://portal.thirdweb.com/references/typescript/v5/inAppWallet). ## Deploying a Modular Contract To deploy a modular contract, you can use the `deployModularContract` function. You can deploy just the core contract, or decide to deploy a core with specific modules preinstalled. Here's an example of deploying a modular ERC721 contract with the `ClaimableERC721` and `BatchMetadataERC721` modules, which recreate a NFT Drop behavior. ```ts import { ClaimableERC721, BatchMetadataERC721, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", // or "ERC20" or "ERC1155" params: { name: "My Modular NFT Contract", }, modules: [ ClaimableERC721.module({ primarySaleRecipient: "0x...", }), BatchMetadataERC721.module(), ], }); ``` Check out the [deployModularContract](https://portal.thirdweb.com/typescript/v5/common/deployModularContract) reference for more information. ## Migration from TypeScript SDK v4 ### Why you should migrate to SDK v5 ##### 1\. Better performance, happier clients The new SDK is built with performance in mind and proper tree-shaking. Therefore, the minimum bundle size of your application is greatly reduced. Below is the comparison of 2 similar applications, using `ConnectWallet` (v4) & `ConnectButton` (v5), which are identical in term of functionality. | SDK v4 | SDK v5 | | | ------------------- | ------------------------------------------------------------------------------- | --------------------- | | Minimum bundle size | 766kb | 104kb | | Dependencies | "@thirdweb-dev/react": "^4.9.4""@thirdweb-dev/sdk": "^4.0.99""ethers": "^5.7.2" | "thirdweb": "^5.42.0" | _(Built with Next.js 14.2.5)_ ##### 2\. More wallets supported The SDK v4 only supports a handful of web3 wallets and the more wallets you want to include in your app, the heavier it becomes. SDK v5 supports over 300 wallets and this number is increasing! You can [interact with wallets based on their unique IDs](https://portal.thirdweb.com/typescript/v5/wallets#example-connect-a-wallet-and-access-an-account-to-send-a-transaction). Hence, adding more wallets to your app has little to no effect to the final bundle. ##### 3\. Flexibility with React hooks When building a React web3 application with thirdweb SDK v4, you have access to a set of prebuilt React hooks which let you conveniently interact with your smart contracts. The issue with this approach is that, the number of smart-contract methods is ever-increasing, and for each hook that does not exist, we have to dedicate time & energy to write, test & maintain. This process is time-consuming & frankly, the more React hooks you add to your app, the slower and more unmaintainable your projects become. In SDK v5, we introduce a novel concept called "prebuilt extensions" - a set of read & write methods for popular contracts which you can _plug & play_. For example: ###### Read contract states with v5 ```ts // Get a list of owned ERC721 tokens in a wallet import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const { data } = useReadContract(getOwned, { contract, owner }); ``` ###### Write to contract with v5 ```ts // Claim an NFT from thirdweb Drop contract import { useSendTransaction } from "thirdweb/react"; import { claimTo } from "thirdweb/extensions/erc721"; const { mutate: sendTx } = useSendTransaction(); const transaction = claimTo({ contract, to: "0x...", quantity: 1n, }); sendTx(transaction); ``` As you can see, by pairing the contract extensions with `useReadContract` (for read) and `useSendTransaction` (for write), we are able to greatly reduce the amount of code that is packaged & shipped to the end users. Plus, with this approach we can dedicate more time to building contract extensions. The SDK v5 currenty supports over hundreds of extensions, with some popular protocols like Uniswap, Farcaster, Lens & more to come. View a list of [supported extensions](https://portal.thirdweb.com/typescript/v5/extensions/built-in) here, or [build your own](https://portal.thirdweb.com/typescript/v5/extensions/create)! ##### 4\. Access to latest software Currently the SDK v4 is using `ethers@5.7.2` and `@tanstack/react-query@^4` which can be considered "outdated". We unfortunately do not have a plan to upgrade v4's dependencies to the latest versions. We highly recommend you to migrate to the SDK v5 to receive the latest software with better security and performance. Want to keep using ethers.js 5? Worry not! The SDK v5 comes with powerful adapters which let you use thirdweb with popular web3 frameworks like viem or ethers 5 & 6. [Learn more](https://portal.thirdweb.com/typescript/v5/adapters#ethers-v5) --- ### High-level changes * All imports from `@thirdweb-dev/*` should be replaced with `thirdweb` SDK with sub-exports. * The new SDK is `function` based rather than `class` based for better tree shaking and performance. * All contract calls are now prepared using `prepareContractCall` and sent using the `sendTransaction` function. * Transactions are submitted without waiting for receipt by default. You can call the `waitForReceipt` function to wait for the transaction to be mined. ### Progressive migration If you're currently using the `@thirdweb-dev/sdk`, you can progressively migrate to the new `thirdweb` SDK. Both SDKs can be used side by side and are interoperable with each other. You can easily share the same wallet between the two SDKs by using the `ethers5adapter` utility, allowing you to progressively replace calls one by one. ```ts import { ThirdwebSDK } from "@thirdweb-dev/sdk"; import { prepareContractCall, sendTransaction } from "thirdweb"; import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const sdk = ThirdwebSDK.fromPrivateKey(pkey, chain); // convert the signer to be used with the new thirdweb SDK const account = await ethers5Adapter.signer.fromEthers(sdk.getSigner()); // then use the new thirdweb SDK normally const transaction = prepareContractCall({ ... }); await sendTransaction({ transaction, account, }); ``` In React, you can mix and match the v4 and v5 `ThirdwebProvider`, that gives you access to the hooks and functionality of both SDKs. ```tsx import { ThirdwebProvider} from "@thirdweb-dev/react" } import { ThirdwebProvider as ThirdwebProviderV5 } from "thirdweb/react" ... ``` From there, you can obtain the current signer using the `useSigner` hook, and convert it when needed using the `ethers5Adapter`: ```tsx import { useSigner } from "@thirdweb-dev/react"; import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const signer = useSigner(); const onClick = async () => { // convert the signer to used with the new SDK const account = await ethers5Adapter.signer.fromEthers(signer); // then use the new SDK normally const transaction = prepareContractCall({ ... }); await sendTransaction({ transaction, account, }); }; ``` ### TypeScript Cheatsheet | Task | @thirdweb-dev/sdk | thirdweb | | ---------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- | | Chains | import { Sepolia } from "@thirdweb-dev/chains" | [import { sepolia } from "thirdweb/chains"](https://portal.thirdweb.com/typescript/v5/chain) | | Wallets | import { MetaMaskWallet } from "@thirdweb-dev/wallets" | [import { createWallet } from "thirdweb/wallets"](https://portal.thirdweb.com/references/typescript/v5/createWallet) | | Initialize | new ThirdwebSDK(...) | [createThirdwebClient({ ... })](https://portal.thirdweb.com/references/typescript/v5/createThirdwebClient) | | Contract | await sdk.getContract(...) | [getContract(...) // no await](https://portal.thirdweb.com/references/typescript/v5/getContract) | | Read | await contract.call(...) | [await readContract(...)](https://portal.thirdweb.com/references/typescript/v5/readContract) | | Prepare | await contract.prepare(...) | [prepareContractCall(...) // no await](https://portal.thirdweb.com/references/typescript/v5/prepareContractCall) | | Send | await contract.call(...) | [await sendTransaction(...)](https://portal.thirdweb.com/references/typescript/v5/sendTransaction) | | Extensions | await contract.erc721.getAll() | [await getNFTs(...)](https://portal.thirdweb.com/references/typescript/v5/erc721/getNFTs) | | Deploy | sdk.deployer.deployBuiltInContract(...) | [await deployPublishedContract(...)](https://portal.thirdweb.com/references/typescript/v5/deploy/deployPublishedContract) | ### React Cheatsheet | Task | @thirdweb-dev/react | thirdweb | | ------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | Provider | import { ThirdwebProvider} from @thirdweb-dev/react | [import { ThirdwebProvider } from "thirdweb/react"](https://portal.thirdweb.com/react/v5/ThirdwebProvider) | | Contract | useContract(...) | [getContract(...) // not a hook](https://portal.thirdweb.com/references/typescript/v5/getContract) | | Address | useAddress(...) | [useActiveAccount(...) // account?.address](https://portal.thirdweb.com/references/typescript/v5/useActiveAccount) | | Read | useContractRead(...) | [useReadContract(...)](https://portal.thirdweb.com/references/typescript/v5/useReadContract) | | Write | useContractWrite(...) | [useSendTransaction()](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction) | | Extensions | useNFTs(...) | [useReadContract(getNFTs, { ... })](https://portal.thirdweb.com/references/typescript/v5/useReadContract) | | Get Signer | useSigner() | [useActiveAccount()](https://portal.thirdweb.com/references/typescript/v5/useActiveAccount) | | Get Wallet | useWallet() | [useActiveWallet()](https://portal.thirdweb.com/references/typescript/v5/useActiveWallet) | | Button | Web3Button | [TransactionButton](https://portal.thirdweb.com/react/v5/TransactionButton) | | Connect | ConnectWallet | [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton) | | Connection Status | useConnectionStatus() | [useActiveWalletConnectionStatus()](https://portal.thirdweb.com/references/typescript/v5/useActiveWalletConnectionStatus) | | Switch Chain | useSwitchChain() | [useSwitchActiveWalletChain()](https://portal.thirdweb.com/references/typescript/v5/useSwitchActiveWalletChain) | | Get Connected Chain | useChain() | [useActiveWalletChain()](https://portal.thirdweb.com/references/typescript/v5/useActiveWalletChain) | ## Interacting with a Modular Contract There are core contracts for ERC20, ERC721 and ERC1155 standards. Those follow the standard ERCs and can be interacted with like usual with the standard extensions. The interesting part is to interact with an attached module. This is done by using the defined module name spaced API for that module. ```ts import { ClaimableERC721 } from "thirdweb/modules"; const transaction = ClaimableERC721.mint({ contract, to: "0x...", // Address to mint tokens to quantity: 2, // Amount of tokens to mint }); // Send the transaction await sendTransaction({ transaction, account }); ``` You can view all the prebuilt modules available in the [modules reference](https://portal.thirdweb.com/references/typescript/v5/functions#modules-1). ## Modular Contracts Modular contracts are a new way to build, deploy, and interact with contracts that can be upgraded and modified over time. ### Built-in modules The SDK comes with a set of built-in modules that are designed to make it easy to interact with popular contracts and protocols. ### Creating your own modules You can also create your own modules to add new functionality to your contracts. Learn more about how to create your own modules [here](https://portal.thirdweb.com/contracts/modular-contracts/get-started/create-module-contract). ## Upgrading a Modular Contract #### Installing a new module These modules can be swapped at any time, and new ones can also be added post deployment. Here's how to install a new module. ```ts import { RoyaltyERC721 } from "thirdweb/modules"; const transaction = RoyaltyERC721.install({ contract: coreContract, account, params: { royaltyRecipient: account.address, royaltyBps: 100n, transferValidator: ZERO_ADDRESS, }, }); ``` The `install` function is available on all modules, organized by module name space. You can also use the standalone [installPublishedModule](https://portal.thirdweb.com/typescript/v5/common/installPublishedModule) function to install custom modules. ## IPFS Storage The thirdweb SDK comes built-in with an IPFS uploader and downloader. ### Download from IPFS ```ts import { download } from "thirdweb/storage"; const file = await download({ client, uri: "ipfs://Qm...", }); ``` You can view all of the configuration options in the [full reference](https://portal.thirdweb.com/references/typescript/v5/download). ### Upload to IPFS #### Uploading JSON objects ```ts import { upload } from "thirdweb/storage"; const uris = await upload({ client, files: [ { name: "something", data: { hello: "world", }, }, ], }); ``` #### Uploading files ```ts import { upload } from "thirdweb/storage"; const uris = await upload({ client, files: [new File(["hello world"], "hello.txt")], }); ``` You can view all of the configuration options in the [full reference](https://portal.thirdweb.com/references/typescript/v5/upload). #### Resolve IPFS uris You can easily convert a `ipfs://` uri to a `https://` uri with your own IPFS gateway using the `resolveScheme` function. The resolved uri will be protected by your api key settings, and only accessible to your whitelisted domains. ```ts import { resolveScheme } from "thirdweb/storage"; const uri = await resolveScheme("ipfs://Qm..."); // resolves to https://.ipfscdn.io/Qm... ``` ## Coinbase Wallet ### Wallet ID `"com.coinbase.wallet"; ` ### Connect Wallet TypeScript React (Custom UI) React (Component) `import { createThirdwebClient } from "thirdweb"; import { createWallet } from "thirdweb/wallets"; const client = createThirdwebClient({ clientId }); const wallet = createWallet("com.coinbase.wallet", { appMetadata: { name: "My app", description: "My app description", icon: "https://myapp.com/icon.png", }, // for mobile, pass the callback URL of your app's universal link mobileConfig: { callbackURL: "https://myapp.com", }, // switch between smart wallet and EOA wallet walletConfig: { options: "smartWalletOnly", // or "eoaOnly" or "all" }, }),; await wallet.connect({ client }); ` ### Reference [View All Creation Options](https://portal.thirdweb.com/references/typescript/v5/CoinbaseWalletCreationOptions) ## Preparing Transactions All transactions sent with the SDK need to be prepared first. Preparing a transaction is synchronous, lightweight and does not require any network requests. It also gives you type-safe definitions for your contract calls. ### Preparing a contract call The recommended way to prepare a contract call is to pass the Solidity method signature and the params. This is type-safe based on the Solidity method signature you define. You can get your desired contract method signature from the solidity code directly. ```ts import { prepareContractCall, toWei } from "thirdweb"; const tx = prepareContractCall({ contract, // Pass the method signature that you want to call method: "function mintTo(address to, uint256 amount)", // and the params for that method // Their types are automatically inferred based on the method signature params: ["0x123...", toWei("100")], }); ``` This will return a prepared transaction object that is ready to be sent to the blockchain and can be acted on in various ways. ### Preparing a raw transaction You can also create a raw transaction directly. This is useful when you want to send ether to an address for example, or when you already have encoded data. ```ts import { prepareTransaction, toWei } from "thirdweb"; const transaction = prepareTransaction({ // The account that will be the receiver to: "0x456...", // The value is the amount of ether you want to send with the transaction value: toWei("1"), // The chain to execute the transaction on chain: defineChain(1), // Your thirdweb client client, }); ``` ### Other ways to prepare a transaction There are few other ways to prepare a contract call, all of these return the same transaction object. #### Generating extension functions for a deployed contract Using the CLI, you can generate optimized functions for all the possible calls to a contract. This saves you time and precomputes all the necessary encoding. ```bash npx thirdweb generate / ``` Read more on how to [generate extension functions using the CLI](https://portal.thirdweb.com/cli). #### Explicit Contract ABI Another way to get type safety is to pass the full contract ABI to `getContract`. This will give you autocompletion for all methods declared in the ABI. There is a slight extract cost of having the full ABI in your code which can be pretty large. ```ts import { getContract, prepareContractCall, toWei } from "thirdweb"; const contract = getContract({ client, chainId, // The ABI for the contract is defined here abi: [ ... { name: "mintTo", inputs: [ { type: "address", name: "to", }, { type: "uint256", name: "amount", }, ], type: "function", } ... ], }); const tx = prepareContractCall({ contract, // We get auto-completion for all the available functions on the contract ABI method: "mintTo", // including full type-safety for the params params: ["0x123...", toWei("100")], }); ``` #### ABI snippet As an alternative to passing the full ABI, you can pass a snippet of the ABI for the method you want to call. This is useful when you only want to call a single method and don't want to have the full ABI in your code. ```ts import { prepareContractCall, toWei } from "thirdweb"; const tx = prepareContractCall({ contract, // Pass a snippet of the ABI for the method you want to call. method: { name: "mintTo", inputs: [ { type: "address", name: "to", }, { type: "uint256", name: "amount", }, ], type: "function", }, // The Types of `params` are automatically inferred based on the ABI inputs. params: ["0x123...", toWei("100")], }); ``` #### Automatic ABI Resolution Finally, you can dynamically resolve contract methods at runtime using the `resolveMethod` function. This is the best way to handle contracts you don't know the ABI of in advance but it is also less performant and not type-safe. ```ts import { prepareContractCall, resolveMethod, toWei } from "thirdweb"; const tx = prepareContractCall({ contract, // in this case we only pass the name of the method we want to call method: resolveMethod("mintTo"), // however using this method we lose type safety for our params params: ["0x123...", toWei("100")], }); ``` #### Please note This method is convenient, however, it is also: * less performant at runtime (it has to resolve the ABI of the contract and then match the method name you provide) * not type-safe (you lose type safety for your params) There are cases where you specifically _need_ to be able to resolve methods dynamically at runtime, in which case this method is useful. ## Reading contract state The recommended way to read the contract state is to use the `readContract` function and pass the Solidity method signature and the params. This is type-safe based on the Solidity method signature you define. You can get your desired contract method signature from the solidity code directly. ```ts import { readContract } from "thirdweb"; const balance = await readContract({ contract: contract, method: "function balanceOf(address) view returns (uint256)", params: ["0x123..."], }); ``` This will execute the read immediately and return the result from the blockchain. ### Reading contract events The recommended way to read the contract events is to use the `getContractEvents` function and passing a prepared event with the Solidity event signature and the params. This is type-safe based on the Solidity event signature you define. You can get your desired contract event signature from the solidity code directly. ```ts import { getContractEvents, prepareEvent } from "thirdweb"; const myEvent = prepareEvent({ signature: "event Transfer(address indexed from, address indexed to, uint256 value)", }); const events = await getContractEvents({ contract: myContract, events: [myEvent], blockRange: 1000, }); ``` #### Generating all read functions and events for a deployed contract Using the CLI, you can generate optimized functions for all the possible calls to a contract. This saves you time and precomputes all the necessary encoding. ```bash npx thirdweb generate / ``` Read more on how to [generate extension functions using the CLI](https://portal.thirdweb.com/typescript/v5/extensions/generate). ## Transactions Transactions are the primary way to read and write to the blockchain. ## Acting on a prepared transaction Transactions have a variety of actions that can be called on them, in all cases this is done by passing the transaction to the various action functions. ### Sending a transaction Send the prepared transaction to the blockchain. Sending a transaction requires a wallet. See [Wallets](https://portal.thirdweb.com/typescript/v5/wallets) for more information on how to create a wallet. ```ts import { sendTransaction } from "thirdweb"; import { createWallet } from "thirdweb/wallets"; const wallet = createWallet("io.metamask"); const account = await wallet.connect({ client }); const transactionResult = await sendTransaction({ transaction, account, }); ``` ### sendAndConfirmTransaction Send a transaction and wait for it to be mined. Useful when you want to block until the transaction is fully confirmed onchain before proceeding to the next step. ```ts import { sendAndConfirmTransaction } from "thirdweb"; import { createWallet } from "thirdweb/wallets"; const wallet = createWallet("io.metamask"); const account = await wallet.connect({ client }); const receipt = await sendAndConfirmTransaction({ transaction, account, }); ``` ### waitForReceipt Wait for a transaction to be mined and get the transaction receipt. ```ts import { sendTransaction, waitForReceipt } from "thirdweb"; import { createWallet } from "thirdweb/wallets"; const wallet = createWallet("io.metamask"); const account = await wallet.connect({ client }); const transactionResult = await sendTransaction({ transaction, account, }); const receipt = await waitForReceipt(transactionResult); ``` ### estimateGas Estimating gas used by a transaction ```ts import { estimateGas } from "thirdweb"; const gasEstimate = await estimateGas({ transaction }); console.log("estmated gas used", gasEstimate); ``` ### estimateGasCost Estimating gas cost in ether and wei for a transaction ```ts import { estimateGas } from "thirdweb"; const gasCost = await estimateGasCost({ transaction }); console.log("cost in ether", gasCost.ether); ``` ### simulateTransaction Simulate a transaction to see if it would be successful. ```ts import { simulateTransaction } from "thirdweb"; const result = await simulateTransaction({ transaction }); console.log("simulation result", result); ``` ### encode Encode a transaction data to be used later ```ts import { encode } from "thirdweb"; const data = await encode(transaction); console.log("encoded data", data); ``` ## Accounts & Wallets We distinguish between "accounts" and "wallets" in the thirdweb SDK. We believe this ultimately provides a more predictable and flexible API for developers. ### What is an Account? * An account always has an `address` and a way to `sign` messages, transactions, and typed data. * An account is always mapped to exactly one address on the blockchain. * An account cannot be "connected" or "disconnected" like a wallet, instead it is often the result of a wallet being connected. See also: [Account (ethereum.org)](https://ethereum.org/en/glossary/#account) ### What is a Wallet? * A wallet "contains" one or more accounts. * A wallet can be "connected" (often prompting the user for approval) or "disconnected". * A wallet cannot independently sign messages, transactions, or typed data, instead, it delegates this to the account(s) it "contains". ### Example: Connect a wallet and access an account to send a transaction. ```ts import { sendTransaction } from "thirdweb"; // We use MetaMask wallet as an example, the pattern is the same for all wallets import { createWallet } from "thirdweb/wallets"; // initialize the wallet, you can pick any of the 300+ wallet connectors supported // wallet ids are typed, let your TS editor autocomplete them for you // ex: "io.metamask", "com.coinbase.wallet", "me.rainbow", etc... const wallet = createWallet("io.metamask"); // connect the wallet, this returns a promise that resolves to the connected account const account = await wallet.connect({ // pass the client you created with `createThirdwebClient()` client, }); // sign & send a transaction with the account -> returns the transaction hash const { transactionHash } = await sendTransaction({ // assuming you have called `prepareTransaction()` or `prepareContractCall()` before which returns the prepared transaction to send transaction, // Pass the account to sign the transaction with account, }); ``` ## ThirdwebContract `ThirdwebContract` is a wrapper around any EVM-compatible smart contract. It allows you to interact with the contract's functions easily, as well as prepare transactions. #### Instantiating a ThirdwebContract ```csharp var contract = await ThirdwebManager.Instance.GetContract( address: "contract-address", chainId: 1, abi: "optional-abi" ); ``` That's it! You can now interact with the contract using the `ThirdwebContract`. It contains `Read`, `Write` and `Prepare` methods to respectively read contract state, write to the contract and prepare transactions. Furthermore, it contains shorthands such as `ThirdwebContract.ERC20_BalanceOf` to easily interact with common contract interfaces. ## TypeScript SDK Performant & lightweight SDK to interact with any EVM chain from Node, React and React Native. Connect TypeScript SDK Connect TypeScript SDK is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-dev/js) ### Installation npmyarnpnpmbun `npm i thirdweb ` #### Have you generated a client ID? You'll need a client ID to access the SDK's free blockchain APIs, storage, and more. [ Generate ](https://thirdweb.com/create-api-key) ### Quickstart Follow our [Quickstart](https://portal.thirdweb.com/typescript/v5/getting-started) to get started with the TypeScript SDK. ### Features * **React and React Native UI Components**: for wallets connection, transactions and more * **In-app wallets**: first-class support for email and social logins * **Account abstraction**: first-class support for ERC4337 smart accounts * **Type safe contract API**: fully typed with human readable ABI * **Code generation**: CLI to generate highly optimized contract, type-safe interfaces\\ * **RPC for any EVM chain**: highly performant RPCs with just a chain id * **IPFS upload/download**: simple and efficient IPFS integration * **Auto ABI resolution**: resolve ABIs for any deployed contract with just an address * **Ethers / Viem Interoperability**: adapters for ethers and viem libraries ### Design principles * **Single package:** for Node, React and React Native with tree shaking for a minimal footprint. * **Performance optimized:** focuses on speed and efficiency with single responsibility principles. * **Out-of-the-box infra:** direct access to all the thirdweb infrastructure from wallets to RPCs to IPFS. * **Developer experience:** type-safe, simple to use, with repeatable and predictable patterns. * **Interoperable:** works with any infra provider and with other libraries like viem and ethers. ### API Reference ### Requirements * Node 18.6 or higher * TypeScript 5.0.4 or higher (for TypeScript users) * React 18.0.0 or higher (for React users) ## Build Instructions ### All Target Platforms * **Player Settings:** Use IL2CPP over Mono when available. * **Build Settings:** Use `Smaller (faster) Builds` / `Shorter Build Time` for IL2CPP Code Generation. * **Stripping Level:** Set `Managed Stripping Level` to `Minimal` (`Player Settings` \> `Other Settings` \> `Optimization`). (Generally not a hard requirement unless using WalletConnect as a wallet provider option.) * **Strip Engine Code:** Make sure this is turned off. ### WebGL * **WebGL Template:** None enforced, feel free to customize! * **Compression Format:** Set to `Disabled` (`Player Settings` \> `Publishing Settings`) for final builds. * **Testing WebGL Social Login Locally:** Host the build or run it locally with `Cross-Origin-Opener-Policy` set to `same-origin-allow-popups`. Example setup for testing In-App or Ecosystem Wallet Social Login locally: ```javascript // YourWebGLOutputFolder/server.js const express = require("express"); const app = express(); const port = 8000; app.use((req, res, next) => { res.header( "Cross-Origin-Opener-Policy", "same-origin-allow-popups", ); next(); }); app.use(express.static(".")); app.listen(port, () => console.log(`Server running on http://localhost:${port}`), ); // run it with `node server.js` ``` No action needed for hosted builds. ### Mobile * **EDM4U:** Comes with the package, resolves dependencies at runtime. Use `Force Resolve` from `Assets` \> `External Dependency Manager` \> `Android Resolver`. * **Redirect Schemes:** Set custom schemes matching your bundle ID in `Plugins/Android/AndroidManifest.xml` or equivalent to ensure OAuth redirects if using social login. ```xml ``` ### Troubleshooting OAuth Redirects If you notice issues with redirects on mobile, for instance hanging after selecting an account when logging in with Google, you did not setup OAuth properly. Best practice is to use a lowercase bundle id that is the same as your Unity project's application identifier, it must be present in the following places: * Your `ThirdwebManager` prefab `Bundle ID` field. * Your `Plugins/AndroidManifest.xml` scheme field as mentioned above (it doesn't have to be our default `AndroidManifest.xml`, it can be in your custom one, just add the scheme). * Your thirdweb dashboard project settings as one of: * `Bundle ID Allowlist` field (those automatically added to allowed redirect URIs). * In-App Wallet Configuration `Allowed redirect URIs` field. ## Getting Started #### API Key Required To get started with the Unity SDK, you will need to have a [thirdweb API Key](https://thirdweb.com/create-api-key) created. Make sure you allowlist a bundle ID to use within Unity native applications. To get started, you'll need to [download and install the Unity Hub and Unity Editor](https://unity.com/download). We recommend using the 2022 LTS version of Unity. ### Integration Steps * #### Unity Package Download Download the latest thirdweb Unity SDK package from the [releases page](https://github.com/thirdweb-dev/unity/releases). * #### Unity Package Import Drag and drop the package into your Unity project. * #### Test it! Play around in our example `Scene_Playground` to test out the SDK! * #### Build it! Refer to the [Build Instructions](https://portal.thirdweb.com/unity/v5/build-instructions), pick a target platform and build your scene! We support all platforms. ### Thirdweb Manager Now you're ready to use the SDK in your own scene! We recommend adding a [ThirdwebManager](https://portal.thirdweb.com/unity/v5/thirdwebmanager) prefab to your scene. Navigate to `Thirdweb` \> `Runtime` \> `Unity` \> `Prefabs` and drag the `ThirdwebManager` into your scene. Alternatively, use our handy quickstart installer from the top level `Tools > Thirdweb` menu. ## Unity SDK v4 to v5 Migration Guide This guide outlines the migration process from thirdweb Unity SDK v4 to v5\. SDK v5 offers enhanced features and modularity, and also allows direct integration with the .NET SDK. ### Key Changes in Unity SDK v5 * **ThirdwebManager**: The `ThirdwebManager` remains the recommended entry point and offers enhanced management of wallets, contracts, and the main ThirdwebClient. However, it simply acts as a wrapper for some lower level APIs from our .NET SDK and is optional. * **Contract Interactions**: Contract interactions are done through the `ThirdwebContract` class, which has more flexible `Prepare`, `Read` and `Write` methods. This allows for easier interaction with various chains. It also has built-in extensions for common contract types like ERC721, ERC1155, etc. * **Wallet Management**: Wallet management has been modularized, providing more control over wallet providers simultaenously. You can instantiate wallets directly through their `Create` function or through `ThirdwebManager.Instance.ConnectWallet`. * **Infrastructure**: An API key is required in v5 for access to thirdweb services like RPC, Storage, Account Abstraction and more. Set your client id and bundle id in your `ThirdwebManager` inspector. * **Integration with .NET SDK**: Unity SDK v5 allows you to directly use the .NET SDK for improved flexibility, especially in contract interaction and wallet operations. ### Migration Steps #### Update Unity SDK to v5 Start by downloading the latest version of the Unity SDK from the [releases page](https://github.com/thirdweb-dev/unity-sdk/releases). Ensure the old SDK files are removed and the new SDK is imported into your Unity project. #### Recommendation It's recommended to back up your project before making any major updates to avoid data loss. #### General Guidelines In v5, the majority of state management has been moved off the `ThirdwebManager` or `ThirdwebSDK`, no longer tying you to a specific chain or wallet at all times. The Unity SDK acts as a wrapper for the .NET SDK, providing a more user-friendly interface. The settings that previously crowded the `ThirdwebManager` have been removed, most of these options can now be set as runtime options when connecting to a wallet or contract. This allows for more flexibility - you may instantiate as many contracts and wallets as you need, on multiple chains, and switch between them easily, or even execute multiple cross-chain transactions simultaneously. You will find that the general structure of functions and classes are similar to v4, but the arguments and return types have been updated to be more flexible and modular. #### ThirdwebManager We've recreated similar APIs to v4 in v5 to make the transition easier. Anything previously under `ThirdwebManager.Instance.SDK` is now directly accessible from `ThirdwebManager.Instance` or through a static class. Review the Unity v5 and .NET SDK documentation to explore the new APIs. ```csharp // Unity v4 var contract = ThirdwebManager.Instance.SDK.GetContract(..); // Unity v5 var contract = await ThirdwebManager.Instance.GetContract(..); // now async // or with .NET SDK var contract = await ThirdwebContract.Create(..); ``` #### Contracts Contract interaction has been simplified in v5\. The specific contract interfaces (e.g., ERC721, ERC1155) are now handled via `ThirdwebContract` with more flexible extension methods. ```csharp // Unity v4 var balance = await contract.ERC1155.Balance(..); // Unity v5 var balance = await contract.ERC1155_Balance(..); // contract.Prepare, contract.Read, contract.Write, etc. are available and take in a chain id ``` #### Wallets In v5, wallets are more modular. You can connect to multiple wallets simultaneously and switch between them easily. ```csharp // Unity v4 var connection = new WalletConnection(..); var address = await ThirdwebManager.Instance.SDK.Wallet.Connect(connection); // Unity v5 var options = new WalletOptions(..); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); // or instantiate the wallet directly with .NET SDK var wallet = await PrivateKeyWallet.Create(..); // Extensions for common wallet operations are available var address = await wallet.GetAddress(); ``` #### Storage v5 requires an API key for storage and RPC services. You can generate an API key from the thirdweb dashboard and integrate it into your Unity project. ```csharp // Unity v4 var data = await ThirdwebManager.Instance.SDK.Storage.DownloadText("{{text_uri}}"); // Unity v5 var data = await ThirdwebStorage.Download("{{text_uri}}"); ``` ### UI If you were using our example prefabs from v4 in production, you may need to back them up as they have been removed from v5\. You can still use them as a reference to create your own prefabs in v5. You may choose to adapt their code to v5 or recreate your own UI and use the new APIs we offer. Generally, for a wallet connect button, all you need is to call `var wallet = await ThirdwebManager.Instance.ConnectWallet` with the appropriate options. You can then display the balance using `await wallet.GetBalance` or other extension methods. `Utils.GetChainMetadata` will help find native token symbols and more, dynamically. New production ready prefabs will be available in future releases. #### Full Reference The [.NET SDK Documentation](https://portal.thirdweb.com/dotnet) provides a comprehensive reference for all classes and methods available in the Unity SDK v5. ## Thirdweb Manager The `ThirdwebManager` is a prefab that provides a convenient way to instantiate the [ThirdwebClient](https://portal.thirdweb.com/dotnet/client), and contains helper functions to create contracts and wallets. Add the prefab to your scene and the client will persist throughout your game's lifecycle, keeping track of your connected wallets. It is entirely optional, and you can opt to use the [.NET SDK](https://portal.thirdweb.com/dotnet) directly if you prefer to do so. If you are wrapping the SDK, we recommend making your own Manager inspired by `ThirdwebManager.cs`, specifically for `ThirdwebClient` initialization. ### Configuration Configure `ThirdwebManager` through the Unity Inspector window. Below is a list of all the settings you can adjust. #### Client ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fthirdwebmanager_client.934bea30.png&w=1920&q=75) This section involves the required thirdweb client settings to configure the SDK: * `Client ID`: Thirdweb [API Key](https://thirdweb.com/create-api-key). Used to access thirdweb services such as RPC, Storage, and Account Abstraction. * `Bundle ID`: The bundle ID used to access thirdweb services from native platforms. Should be the same as the bundle ID in your Unity project, e.g., `com.companyname.gamename`. * `Create API Key`: A link to create a new API key if you don't have one. #### Preferences ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fthirdwebmanager_preferences.83c36717.png&w=1920&q=75) This section allows you to define the default preferences for the SDK: * `Initialize On Awake`: Whether the SDK should initialize on awake or not. If not, you can call `ThirdwebManager.Instance.Initialize()` to initialize it manually. * `Show Debug Logs`: Whether to show thirdweb SDK debug logs. * `Auto-Connect Last Wallet`: If enabled, we will automatically connect to the last connected wallet on initialization (this behavior does not apply to the WalletConnectWallet provider option). If a wallet was connected as a non smart wallet, then later upgraded, the smart wallet is saved as the last wallet, and the next session will autoconnect to the smart wallet. Any failure during this entire flow should not throw. #### Miscellaneous ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fthirdwebmanager_misc.94a0f038.png&w=1920&q=75) This section allows you to customize the SDK's behavior: * `RPC Overrides`: A list of RPC overrides to use when connecting to a chain. You can bypass using thirdweb's RPC that way (not recommended). * `OAuth Redirect Page HTML Override`: Raw HTML to override the default redirect page when connecting to `InAppWallet` or `EcosystemWallet` providers. * `WalletConnect Supported Chains`: A list of chains that the wallets should be able to connect to by default when using `WalletConnect` as a wallet provider. * `WalletConnect Included Wallet IDs`: A list of wallet IDs that should be included in the WalletConnect modal by default (optional override). #### Debug ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fthirdwebmanager_debug.76611661.png&w=1920&q=75) This section allows you to find helpful information: * `Log Active Wallet Info`: Logs the active (last connected) wallet's information such as its address. * `Open Documentation`: Opens the thirdweb SDK documentation in your default browser. ### Interacting with the ThirdwebManager Once your `ThirdwebManager` is set up, you can interact with it using the following methods: #### Initialize (If not set to `Initialize On Awake`) ```csharp ThirdwebManager.Instance.Initialize(); ``` Initializes the SDK with the settings specified in the Unity Inspector. #### GetContract ```csharp var contract = await ThirdwebManager.Instance.GetContract("contract-address", chainId, "optional-contract-abi"); var result = await contract.Read("name"); ``` Returns a [ThirdwebContract](https://portal.thirdweb.com/dotnet/contracts/create) instance that can be used to interact with a smart contract. #### ConnectWallet ```csharp var walletOptions = new WalletOptions(WalletProvider.PrivateKeyWallet, 421614); var wallet = await ThirdwebManager.Instance.ConnectWallet(walletOptions); var address = await wallet.GetAddress(); ``` Connects a wallet based on the specified `WalletOptions` and returns an `IThirdwebWallet` instance that can be used to interact with the blockchain. #### UpgradeToSmartWallet ```csharp var smartWallet = await ThirdwebManager.Instance.UpgradeToSmartWallet(wallet, chainId, smartWalletOptions); ``` Upgrades the specified wallet to a `SmartWallet`, returning a `SmartWallet` instance. #### LinkAccount ```csharp var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainWallet, walletToLink, otp, chainId, jwtOrPayload); ``` Links another `InAppWallet` or `EcosystemWallet` account to the main wallet and returns a list of linked accounts, allowing you to login with either authentication method later. #### GetActiveWallet ```csharp var wallet = ThirdwebManager.Instance.GetActiveWallet(); ``` Returns the currently active wallet as an `IThirdwebWallet`. #### SetActiveWallet ```csharp ThirdwebManager.Instance.SetActiveWallet(wallet); ``` Sets the specified wallet as the active wallet. #### GetWallet ```csharp var wallet = ThirdwebManager.Instance.GetWallet("wallet-address"); ``` Returns a wallet from the manager's wallet mapping by its address. #### AddWallet ```csharp var wallet = await ThirdwebManager.Instance.AddWallet(wallet); ``` Adds a wallet to the manager's wallet mapping and returns the added wallet. #### RemoveWallet ```csharp ThirdwebManager.Instance.RemoveWallet("wallet-address"); ``` Removes a wallet from the manager's wallet mapping by its address. ### Child Prefabs #### DefaultOTPModal The helper modal that is displayed when using the `ThirdwebManager`'s `ConnectWallet` function with an auth method that requires an OTP, such as Email or Phone login. It can be replaced with a custom modal that extends `AbstractOTPVerifyModal` to customize the OTP verification process. #### WalletConnectModal The `WalletConnectModal` prefab is an out-of-the-box WalletConnect modal that can be used to connect to 400+ wallets. It will be automatically activated when connecting to a `WalletConnect` provider. ### What Now? Explore the [.NET SDK](https://portal.thirdweb.com/dotnet) to learn more about interacting with smart contracts, wallets, storage, RPC, account abstraction, and more. ## InAppWallet `InAppWallet` is the ultimate persistent wallet provider option for your game. It supports email, phone, social and custom authentication schemes, and will persist across devices, platforms, and other SDKs. It makes for a fantastic [SmartWallet](https://portal.thirdweb.com/unity/v5/wallets/account-abstraction) admin/signer and will make sure your users can have the same wallet address across all your games, apps and blockchains. ### Login Methods In-App Wallets support a variety of login methods: * Email (OTP Login) * Phone (OTP Login) * Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch, Steam etc.) * Custom Auth (OIDC Compatible) * Custom Auth (Generic Auth Endpoint) * Guest (Onboard easily, link other accounts later) * Backend (Server Wallets) * Siwe (Login with a seperate wallet supported by the SDK) * SiweExternal (Login with an external wallet that only supports web using a browser loading a static thirdweb React page temporarily) #### Login with Email ```csharp var inAppWalletOptions = new InAppWalletOptions(email: "myepicemail@domain.id"); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will instantiate `InAppWalletModal` or resume the session - a simple prefab that will verify the user OTP. #### Login with Phone ```csharp var inAppWalletOptions = new InAppWalletOptions(phoneNumber: "+1234567890"); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will instantiate `InAppWalletModal` or resume the session - a simple prefab that will verify the user OTP. #### Login with Socials (Google, Apple, Facebook, etc.) ```csharp var inAppWalletOptions = new InAppWalletOptions(authprovider: AuthProvider.Google); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will open a native browser or oauth session to authenticate the user and redirect back to the game. #### Login with Siwe ```csharp var inAppWalletOptions = new InAppWalletOptions(authprovider: AuthProvider.Siwe, siweSigner: sdkSupportedExternalWallet); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will use a separate wallet to sign a message and login to the InAppWallet. #### Login with SiweExternal ```csharp var inAppWalletOptions = new InAppWalletOptions(authprovider: AuthProvider.SiweExternal) var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 421614, inAppWalletOptions: inAppWalletOptions ); var wallet = await ConnectWallet(inAppWalletOptions); ``` Will open a browser and load a static thirdweb React page to authenticate the user and redirect back to the game. You can pass `forceSiweExternalWalletIds` to force the page to use one or more wallets. Example: ```csharp var inAppWalletOptions = new InAppWalletOptions( authprovider: AuthProvider.SiweExternal, forceSiweExternalWalletIds: new List { "xyz.abs" }); ``` #### Login with Custom Auth - OIDC Compatible ```csharp var inAppWalletOptions = new InAppWalletOptions(authprovider: AuthProvider.JWT, jwtOrPayload: "myjwt"); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Custom Auth - Generic Auth Endpoint ```csharp var inAppWalletOptions = new InAppWalletOptions( authprovider: AuthProvider.AuthEndpoint, jwtOrPayload: "mypayload" ); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Guest - Onboard easily, link other accounts later ```csharp var inAppWalletOptions = new InAppWalletOptions( authprovider: AuthProvider.Guest ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Backend - Server Wallets ```csharp var inAppWalletOptions = new InAppWalletOptions( authprovider: AuthProvider.Backend, walletSecret: "very-secret" ); var options = new WalletOptions( provider: WalletProvider.InAppWallet, chainId: 1, inAppWalletOptions: inAppWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` ### Account Linking InAppWallets support linking multiple authentication methods to a single wallet, for instance linking Google to your Email-based In-App-Wallet. This is useful to have a unified identity across platforms. ```csharp // Your main InAppWallet account, already authenticated and connected InAppWallet mainInAppWallet = ... // An InAppWallet with a new auth provider to be linked to the main account, not connected InAppWallet walletToLink = await InAppWallet.Create(client: Client, authProvider: AuthProvider.Telegram); // Link Account - Headless version var linkedAccounts = await mainInAppWallet.LinkAccount(walletToLink: walletToLink); // Link Account - Unity wrapper version var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainInAppWallet, walletToLink); // You can also fetch linked accounts at any time List linkedAccounts = await mainInAppWallet.GetLinkedAccounts(); // Unlink an account List linkedAccounts = await mainInAppWallet.UnlinkAccount(linkedAccounts[0]); ``` ## SmartWallet Instantiate or upgrade any other wallet to a `SmartWallet` to enable advanced blockchain interactions, including gasless transactions through Account Abstraction (ERC4337 as well as ZkSync Native AA). Account Abstraction is a system that turns any personal wallet into a smart wallet, allowing you to sponsor gas for your users and unlocking advanced permissioning features that allow for seamless user onboarding, gasless transactions, automation and more. We recommend using Smart Wallets as the primary wallet type for your users. #### Connecting to a Smart Wallet directly ```csharp var smartWalletOptions = new SmartWalletOptions(sponsorGas: true) var options = new WalletOptions(..., smartWalletOptions: smartWalletOptions); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Upgrading an existing wallet to a Smart Wallet ```csharp var smartWalletOptions = new SmartWalletOptions(sponsorGas: true) var smartWallet = await ThirdwebManager.Instance.UpgradeToSmartWallet( personalWallet: myExistingIThirdwebWallet, chainId: 1, smartWalletOptions: smartWalletOptions ); ``` ## MetaMaskWallet `MetaMaskWallet` is the most popular external wallet provider that allows users to connect their MetaMask wallet to your game. This connection method allows you to connect to the browser extension and is only available for WebGL builds. Use [WalletConnectWallet](https://portal.thirdweb.com/unity/v5/wallets/walletconnect) if you are building for standalone or mobile runtime platforms. #### Connecting using MetaMask ```csharp var options = new WalletOptions(provider: WalletProvider.MetaMaskWallet, chainId: 1); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will prompt the user to connect their MetaMask browser extension to your game. ## PrivateKeyWallet `PrivateKeyWallet` is best used as a guest wallet. Should be treated as ephemereal, useful for testing. #### Generating a PrivateKeyWallet ```csharp var options = new WalletOptions(provider: WalletProvider.PrivateKeyWallet, chainId: 1); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` ## EcosystemWallet `EcosystemWallet` is the ultimate persistent wallet provider option for your game. It supports email, phone, social and custom authentication schemes, and will persist across devices, platforms, and other SDKs. It makes for a fantastic [SmartWallet](https://portal.thirdweb.com/unity/v5/wallets/account-abstraction) admin/signer and will make sure your users can have the same wallet address across all your games, apps and blockchains. Ecosystem Wallets have a very similar API to the [In-App Wallet](https://portal.thirdweb.com/unity/v5/wallets/in-app-wallet) but with the added benefit of being able to share your wallets with ecosystem partners through special identifiers that they can use, preserving the user's identity across not only your apps and games, but other ecosystem partners' as well. It is secure, easy to use, and use enclave technology to protect your user's data. All examples below can take in an `ecosystemPartnerId` if you are the ecosystem partner integrating with a third-party ecosystem. ### Login Methods Ecosystem Wallets support a variety of login methods: * Email (OTP Login) * Phone (OTP Login) * Socials (Google, Apple, Facebook, Telegram, Farcaster, Line, Github, Twitch, Steam etc.) * Custom Auth (OIDC Compatible) * Custom Auth (Generic Auth Endpoint) * Guest (Onboard easily, link other accounts later) * Backend (Server Wallets) * Siwe (Login with a seperate wallet supported by the SDK) * SiweExternal (Login with an external wallet that only supports web using a browser loading a static thirdweb React page temporarily) #### Login with Email ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", email: "myepicemail@domain.id" ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will instantiate `EcosystemWalletModal` or resume the session - a simple prefab that will verify the user OTP. #### Login with Phone ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", phoneNumber: "+1234567890" ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will instantiate `EcosystemWalletModal` or resume the session - a simple prefab that will verify the user OTP. #### Login with Socials (Google, Apple, Facebook, etc.) ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.Google ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will open a native browser or oauth session to authenticate the user and redirect back to the game. #### Login with SIWE ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.Siwe, siweSigner: anyExternalWallet ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will use the external wallet to sign a message and login to the EcosystemWallet. #### Login with SiweExternal ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions(ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.SiweExternal) var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 421614, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ConnectWallet(options); ``` Will open a browser and load a static thirdweb React page to authenticate the user and redirect back to the game. You can pass `forceSiweExternalWalletIds` to force the page to use one or more wallets. Example: ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.SiweExternal, forceSiweExternalWalletIds: new List { "xyz.abs" }); ``` #### Login with Custom Auth - OIDC Compatible ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.JWT, jwtOrPayload: "myjwt" ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Custom Auth - Generic Auth Endpoint ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.AuthEndpoint, jwtOrPayload: "mypayload" ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Guest - Onboard easily, link other accounts later ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.Guest ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` #### Login with Backend - Server Wallets ```csharp var ecosystemWalletOptions = new EcosystemWalletOptions( ecosystemId: "ecosystem.your-ecosystem", authprovider: AuthProvider.Backend, walletSecret: "very-secret" ); var options = new WalletOptions( provider: WalletProvider.EcosystemWallet, chainId: 1, ecosystemWalletOptions: ecosystemWalletOptions ); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` ### Account Linking EcosystemWallets support linking multiple authentication methods to a single wallet, for instance linking Google to your Email-based In-App-Wallet. This is useful to have a unified identity across platforms. ```csharp // Your main EcosystemWallet account, already authenticated and connected EcosystemWallet mainEcosystemWallet = ... // An EcosystemWallet with a new auth provider to be linked to the main account, not connected EcosystemWallet walletToLink = await EcosystemWallet.Create(client: Client, ecosystemId: "ecosystem.your-ecosystem", authProvider: AuthProvider.Telegram); // Link Account - Headless version var linkedAccounts = await mainEcosystemWallet.LinkAccount(walletToLink: walletToLink); // Link Account - Unity wrapper version var linkedAccounts = await ThirdwebManager.Instance.LinkAccount(mainEcosystemWallet, walletToLink); // You can also fetch linked accounts at any time List linkedAccounts = await mainEcosystemWallet.GetLinkedAccounts(); // Unlink an account List linkedAccounts = await mainEcosystemWallet.UnlinkAccount(linkedAccounts[0]); ``` ## WalletConnectWallet `WalletConnectWallet` is a wallet provider that allows users to connect any of 400+ external wallets. It uses the [WalletConnect](https://explorer.walletconnect.com/) protocol. #### Connecting using WalletConnect ```csharp var options = new WalletOptions(provider: WalletProvider.WalletConnectWallet, chainId: 1); var wallet = await ThirdwebManager.Instance.ConnectWallet(options); ``` Will instantiate `WalletConnectModal` \- an out-of-the-box WalletConnect modal that can be used to connect to 400+ wallets. Make sure you have any chains you want to connect to added to your [ThirdwebManager](https://portal.thirdweb.com/unity/v5/thirdwebmanager) prefab. ## Unity SDK The best Unity SDK to build cross-platform games on any EVM blockchain. Connect to user’s wallets, interact with smart contracts, sign messages, and utilize common standards such as tokens, NFTs, marketplaces; all with built-in RPC URLs, IPFS gateways, Account Abstraction and more. Unity SDK Unity SDK is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-dev/unity) ### Installation The Unity SDK is distributed as an [Asset Package](https://docs.unity3d.com/Manual/AssetPackages.html) allowing you to view and edit the source code. It also wraps our open-source gaming-focused [.NET SDK](https://github.com/thirdweb-dev/dotnet) making version updates extremely simple containing a single DLL filechange. You can download the latest version of the SDK from our [GitHub releases page](https://github.com/thirdweb-dev/unity-sdk/releases). ### Get Started Check out the [getting started](https://portal.thirdweb.com/unity/v5/getting-started) guide to learn how to use the SDK in less than 2 minutes. ### Examples ## Engine ### Contract Interaction #### Read Contract Call the Read Contract endpoint on an engine instance. #### Write Contract Call the Write Contract endpoint on an engine instance. #### Get Transaction Status Get the transaction Status of a queue id from an engine instance. #### Get Transaction Receipt Get the transaction receipt of a transaction hash from a chain. ## Smart Wallets #### Create Smart Wallet Creates an in-app email wallet. #### Is Deployed Checks if the smart wallet is deployed. #### Create Session Key Creates a session key for the smart wallet. #### Get Admins Retrieves the list of admins for the smart wallet. #### Get Active Signers Retrieves the list of active signers for the smart wallet. #### Is Active Signer Checks to see if a specific signer is valid #### Revoke Session Key Revokes a session key for a smart wallet signer. #### Add Admin Adds an admin signer to the smart wallet. #### Remove Admin Removes an admin signer from the smart wallet. ## In-App Wallets #### Create Wallet Creates an in-app wallet based on inputs. #### Sign In Sign in, passing the required input if OTP, JWT, or Auth Endpoint #### Link Wallet Link a new auth method with a created - but never signed in - wallet ### OTP #### Send OTP Sends an OTP for the in-app wallet. ### OAuth #### Fetch OAuth login link Fetches the OAuth login link for the in-app wallet. ### Utilities #### Is Connected Checks if the wallet handle is connected to a session. boolean and macro variants #### Disconnect Disconnects the wallet handle from its session. ## Blueprint Overview All blueprint facing nodes are contained within the `UThirdwebFunctionLibrary` class. It provides a comprehensive set of Blueprint functions to interact with Thirdweb's wallet functionalities within Unreal Engine. This includes utilities for wallet creation, session management, signing messages, and more. ### Internal Implementation Notes * The `BP_` function prefix is an unreal engine standard designed to ensure c++ developers do not use functions intended for blueprint use * The `Conv_` function prefix is an unreal engine required convention to detect autocast nodes * All operator function prefixes are an unreal engine convention required to detect standard operator node wildcards ## Utilities #### Sign Message Signs a message with the specified wallet handle. #### To Text/String Signs a message with the specified wallet handle. #### Is Valid Address Checks the validity of the address #### Is Checksummed Address Signs a message with the specified wallet handle. #### To Checksummed Address Signs a message with the specified wallet handle. #### Is Valid Signs a message with the specified wallet handle. #### Equality Native equality/inequality operators #### Zero Address Constant zero address #### OAuth Provider to String/Text Convert an EThirdwebOAuthProvider to string/text #### String/Text to OAuth Provider Convert string/text to an EThirdwebOAuthProvider ## Common `ThirdwebCommon` defines several common enums and structs that are used across the Thirdweb Unreal Engine SDK. They represent various states and outcomes for operations related to wallets, smart contracts, and authentication providers. ### Enums #### **EFunctionResult** Represents the result of a generic function call. * `Success`: The operation completed successfully. * `Failed`: The operation failed. #### **ESmartWalletDeployedFunctionResult** Represents the deployment status of a smart wallet. * `Deployed`: The smart wallet is deployed. * `NotDeployed`: The smart wallet is not deployed. * `Failed`: The check for deployment status failed. #### **EOTPVerificationFunctionResult** Represents the result of an OTP (One-Time Password) verification. * `Verified`: The OTP was successfully verified. * `Retry`: The OTP verification failed, but can be retried. * `Failed`: The OTP verification failed with no retry available. #### **EThirdwebOAuthProvider** * Represents the supported OAuth providers. * `Google`: Represents Google as an OAuth provider. * `Apple`: Represents Apple as an OAuth provider. * `Facebook`: Represents Facebook as an OAuth provider. * `Discord`: Represents Discord as an OAuth Provider. * `Farcaster`: Represents Farcaster as an OAuth Provider. * `Telegram`: Represents Telegram as an OAuth Provider. * `Line`: Represents Line as an OAuth Provider. * `X`: Represents X as an OAuth Provider. * `Coinbase`: Represents Coinbase as an OAuth Provider. #### **EThirdwebOTPMethod** * Represents the supported OTP authentication methods. * `Email`: Email authentication. * `Phone`: Phone Authentication. ### Structs #### FSigner `FSigner` represents a signer in the context of a smart wallet within the Thirdweb SDK. The signer is responsible for signing transactions and managing the approval of targets and limits on native tokens. ##### Properties * `Address`: The Ethereum address of the signer. * `ApprovedTargets`: An array of approved contract addresses that the signer is allowed to interact with. * `NativeTokenLimitPerTransaction`: The limit of native tokens (e.g. ETH) that can be spent per transaction. * `StartTime`: The start time for the signer's permissions, specified as a `FDateTime`. * `EndTime`: The end time for the signer's permissions, specified as a `FDateTime`. ##### Class Functions * `FromJson(JsonObject)`: create an `FSigner` instance from a JSON object. ## Runtime Settings `ThirdwebRuntimeSettings` provides configuration settings for the Thirdweb SDK within Unreal Engine. These settings are used by the SDK to manage essential information like client credentials and storage paths. The runtime settings are located in `Edit > Project Settings > Engine > Thirdweb`. You can also access the settings by clicking the thirdweb logo on your Editor action bar, or manually in `DefaultEngine.ini`. ### **Properties** * `ClientID`: The client ID used to authenticate with Thirdweb services. * `BundleID`: The bundle ID associated with the application. * `EncryptionKey`: Required if using custom auth methods via standard InApp wallets (Non-Ecosystem). * `EngineSigners`: Optional array of engine signers stored globally for convenience * `EcosystemId`: Ecosystem Wallet Identifier tied to your Thirdweb Ecosystem account. Only relevant when using Ecosystem Wallets. e.g. `ecosystem.my-cool-game` * `bSendAnalytics`: Opt in or out of connect analytics. * `bOverrideOAuthBrowserProviderBackends`: Edit Condition for overriding OAuth browser Provider backends * `OAuthBrowserProviderBackendOverrides`: Array of OAuth provider backend methods that can be overridden #### Configuration Requirements `ClientID` \+ `BundleID` are required for authentication with Thirdweb services.`EcosystemId` is required if using ecosystem wallets #### Class Functions * **`Get()`**: Retrieve the current `UThirdwebRuntimeSettings` instance. * **`GetThirdwebGlobalEngineSigners()`**: Retrieve the `EngineSigners` array. * **`GetThirdwebGlobalEngineSigner(bFound)`**: Retrieve the first Engine Signer from the `EngineSigners` array, if any. * **`GetEncryptionKey()`**: Static accessor to get `EncryptionKey` * **`GetStorageDirectory()`**: Static accessor to retrieve the absolute path of the thirdweb InAppWallet platform save directory * **`IsExternalOAuthBackend(Provider)`**: Static accessor to get the resolved backend of an OAuth provider * **`GetEcosystemId()`**: Static accessor to get `EcosystemId` * **`IsEcosystem()`**: Static accessor to check `EcosystemId` validity * **`GetClientId()`**: Static accessor to get `ClientID` * **`GetBundleId()`**: Static accessor to get `BundleId` * **`AnalyticsEnabled()`**: Static accessor to check Analytics Opt-In status ## ThirdwebUtils The `ThirdwebUtils` namespace provides a set of utility functions for class-agnostic use. ### Validation Functions * `IsChecksummedAddress(Address)`: Checks if the provided Ethereum address is checksummed. * `IsValidAddress(Address)`: Checks if the provided Ethereum address is valid. * `IsValidPrivateKey(PrivateKey)`: Determines if the provided string is a valid private key. * `ToChecksummedAddress(Address)`: Converts the provided Ethereum address to a checksummed address. ### Conversion Functions * `ToText(Provider)`: Converts an [EThirdwebOAuthProvider](https://portal.thirdweb.com/unreal/cpp/common#ethirdweboauthprovider) enum value to its corresponding FText representation. * `ToString(Provider)`: Converts an [EThirdwebOAuthProvider](https://portal.thirdweb.com/unreal/cpp/common#ethirdweboauthprovider) enum value to its string representation. ## WalletHandle `FWalletHandle` is the base struct that provides a unique handle for distinguishing different types of wallets in the Thirdweb SDK. It supports a variety of shared operations and is not used directly, but rather inherited. ### Enums #### EWalletHandleType Wallet handle type identifier. * `InvalidHandle`: Represents an uninitialized or invalid handle. * `InApp`: Represents an in-app wallet. * `Smart`: Represents a smart contract wallet. ### Member Functions * **`IsValid()`**: Checks if the wallet handle is valid. * **`Invalidate()`**: Invalidates the wallet handle, setting its ID to zero and marking its type as invalid. * **`ToAddress()`**: Retrieves the wallet address associated with this handle. * **`Sign(Message)`**: Sign a message using the wallet handle. * **`GetType()`**: Get the type of wallet handle. * **`GetID()`**: Gets the ID of the wallet handle. * **`GetDisplayName()`**: Retrieves the debug display name of the wallet handle. * **`GetTypeString()`**: Retrieves the type of the wallet handle as a string. ### Operators * **`operator==`**: Compares two wallet handles for equality. * **`operator!=`**: Compares two wallet handles for inequality. ## InAppWalletHandle `FInAppWalletHandle` provides a unique handle for InApp wallets. It supports a variety of operations for authentication. ### Enums #### EInAppSource Source that created the InApp wallet * `InvalidSource`: Represents an uninitialized or invalid source. * `OAuthProvider`: Represents an OAuth provider source. * `Email`: Represents an email source. * `Phone`: Represents a phone source. * `Jwt`: Represents a JWT source. * `AuthEndpoint`: Represents an auth endpoint source. * `Guest`: Represents a guest source. ### Member Functions * **`CreateEmailWallet(Email, Wallet, Error)`**: Creates an in-app email wallet. * **`CreateEcosystemEmailWallet(PartnerId, Email, Wallet, Error)`**: Creates an ecosystem email wallet. * **`CreateOAuthWallet(Provider, Wallet, Error)`**: Creates an in-app OAuth wallet using the specified provider. * **`CreateEcosystemOAuthWallet(PartnerId, Provider, Wallet, Error)`**: Creates an ecosystem OAuth wallet using the specified provider. * **`CreatePhoneWallet(Phone, Wallet, Error)`**: Creates an in-app phone wallet. * **`CreateEcosystemPhoneWallet(PartnerId, Phone, Wallet, Error)`**: Creates an ecosystem phone wallet. * **`CreateJwtWallet(Wallet, Error)`**: Creates an in-app JWT wallet. * **`CreateEcosystemJwtWallet(PartnerId, Wallet, Error)`**: Creates an ecosystem JWT wallet. * **`CreateAuthEndpointWallet(Wallet, Error)`**: Creates an in-app wallet using an authentication endpoint. * **`CreateEcosystemAuthEndpointWallet(PartnerId, Wallet, Error)`**: Creates an ecosystem wallet using an authentication endpoint. * **`CreateGuestWallet(Email, Wallet, Error)`**: Creates an in-app guest wallet. * **`CreateEcosystemGuestWallet(PartnerId, Email, Wallet, Error)`**: Creates an ecosystem guest wallet. * **`IsConnected()`**: Checks if the wallet is connected to a session. * **`Disconnect()`**: Disconnects a wallet from a session. * **`VerifyOTP(Method, OTP, Error)`**: Verifies an OTP for in-app wallets. * **`SendOTP(Method, Error)`**: Sends an OTP for in-app wallets. * **`FetchOAuthLoginURL(RedirectUrl, LoginLink, Error)`**: Fetches the OAuth login URL for in-app wallets. * **`SignInWithOAuth(AuthResult, Error)`**: Signs in using OAuth authentication details. * **`SignInWithJwt(Jwt, Error)`**: Signs in using a JSON Web Token (JWT). * **`SignInWithAuthEndpoint(Jwt, Error)`**: Signs in using any payload. * **`SignInWithGuest(Error)`**: Signs in as an anonymous guest user using a semi-reproducible device fingerprint. Fingerprints can change from update to update and should not be relied upon for long term use. * **`GetSourceString()`**: Retrieves the source as an `FString`. * **`GetSourceString(Source)`**: Retrieves the specified source as an `FString`. * **`GetOAuthProvider()`**: Retrieves the configured OAuth provider. ## SmartWalletHandle `FSmartWalletHandle` provides a unique handle for smart wallets. It supports a variety of operations for handling sessions, and interacting with smart contract wallets. ### Member Functions * **`Create(InInAppWallet, ChainID, bGasless, Factory, AccountOverride, bSuccess, Error)`**: Creates a smart wallet. * **`IsDeployed(bDeployed, Error)`**: Checks if the smart wallet is deployed. * **`CreateSessionKey(Signer, ApprovedTargets, NativeTokenLimitPerTransactionInWei, PermissionStart, PermissionEnd, RequestValidityStart, RequestValidityEnd, TransactionHash, Error)`**: Creates a session key for a smart wallet. * **`RevokeSessionKey(Signer, Error)`**: Revokes a session key for a smart wallet. * **`GetAdmins(Admins, Error)`**: Retrieves the admins of a smart wallet. * **`AddAdmin(Signer, Error)`**: Adds an admin to a smart wallet. * **`RemoveAdmin(Signer, Error)`**: Removes an admin from a smart wallet. * **`GetActiveSigners(Signers, Error)`**: Retrieves the active signers of a smart wallet. ## Getting Started #### API Key Required To get started with the Unreal SDK, you will need to have a [thirdweb API Key](https://thirdweb.com/create-api-key) created. Make sure you allowlist a bundle ID to use within Unreal native applications. ### Integration Steps * #### Plugin Download Download and install the Thirdweb Unreal Plugin from the [Unreal Marketplace](https://www.unrealengine.com/marketplace/en-US/product/f21200c2610146f3888172994448e50d). * #### Runtime Settings Once you import the plugin into your project, you will need to set up the plugin settings with your Client ID and Bundle ID. You can do so by clicking the thirdweb icon on your engine action bar, or by navigating to`Edit > Project Settings > Engine > Thirdweb` and filling in the required fields. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Funreal-engine-settings.0a348246.png&w=2048&q=75) Alternatively, you can head to your root `Config` folder and open the `DefaultEngine.ini` file to set up the plugin settings. ```ini [/Script/Thirdweb.ThirdwebRuntimeSettings] ClientID= BundleID= ``` * #### Test it! Try out our prebuilt example `Level_Thirdweb` to create and login to wallets seamlessly, using all kinds of authentication, and explore advanced Account Abstraction use cases. ![](/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Funreal-engine-level.57455467.png&w=3840&q=75) ## Thirdweb The `Thirdweb` namespace is a low-level wrapper around the `Thirdweb` Rust library, providing a set of utility functions and classes to interact with the Thirdweb SDK. #### Note Although accessible, this namespace is designed as an internal wrapper. All functionality is exposed in its intended place throughout the plugin, and the following is documented is for posterity. ### Structures #### **FFIResult** Encapsulates operation results, returning success status and messages. ##### Properties * **`bool success`**: Success status of the operation result * **`const char* message`**: Operation result message ##### Member Functions * **`AssignResult(Output, bErrorOnlyResult)`**: Assign's result and then frees the underlying pointer * **`GetOutput()`**: Assign's result to output directly * **`Free()`**: Frees the underlying pointer for functions that have no relevant output * **`Log()`**: Convenience function to log all properties ### Internal Functions The `Thirdweb` namespace in `Thirdweb.h` offers various methods for managing wallets and interacting with smart contracts. Note that inputs may change in future versions, so always refer to the latest documentation or source code for the most accurate information. #### Wallet Management ##### Private Key Wallet * **`create_private_key_wallet(private_key)`**: Creates a wallet using a private key. * **`generate_private_key_wallet()`**: Generates a new private key wallet. * **`private_key_wallet_export(handle_id)`**: Exports the private key of a wallet. ##### In App Wallet * **`create_in_app_wallet(client_id, bundle_id, secret_key, email, storage_directory_path, auth_provider)`**: Creates an in-app wallet. * **`in_app_wallet_send_otp_email(handle_id)`**: Sends an OTP for in-app email wallet. * **`in_app_wallet_verify_otp_email(handle_id, otp)`**: Verifies an OTP for in-app email wallet. * **`in_app_wallet_send_otp_phone(handle_id)`**: Sends an OTP for in-app phone wallet. * **`in_app_wallet_verify_otp_phone(handle_id, otp)`**: Verifies an OTP for in-app phone wallet. * **`in_app_wallet_fetch_oauth_login_link(handle_id, redirect_url)`**: Fetches an OAuth login link for in-app wallet. * **`in_app_wallet_sign_in_with_oauth(handle_id, auth_result)`**: Signs in with OAuth for in-app wallet. * **`in_app_wallet_sign_in_with_jwt(handle_id, jwt, encryption_key)`**: Signs in with jwt for in-app wallet. * **`in_app_wallet_sign_in_with_auth_endpoint(handle_id, payload, encryption_key)`**: Signs in with auth endpoint for in-app wallet. * **`in_app_wallet_sign_in_with_guest(handle_id, session_id)`**: Signs in with guest for in-app wallet. #### Ecosystem Wallet * **`create_ecosystem_wallet(ecosystem_id, ecosystem_partner_id, client_id, bundle_id, secret_key, email, storage_directory_path, auth_provider)`**: Creates an ecosystem wallet. * **`ecosystem_wallet_send_otp_email(handle_id)`**: Sends an OTP for ecosystem email wallet. * **`ecosystem_wallet_verify_otp_email(handle_id, otp)`**: Verifies an OTP for ecosystem email wallet. * **`ecosystem_wallet_send_otp_phone(handle_id)`**: Sends an OTP for ecosystem phone wallet. * **`ecosystem_wallet_verify_otp_phone(handle_id, otp)`**: Verifies an OTP for ecosystem phone wallet. * **`ecosystem_wallet_fetch_oauth_login_link(handle_id, redirect_url)`**: Fetches an OAuth login link for ecosystem wallet. * **`ecosystem_wallet_sign_in_with_oauth(handle_id, auth_result)`**: Signs in with OAuth for ecosystem wallet. * **`ecosystem_wallet_sign_in_with_jwt(handle_id, jwt)`**: Signs in with jwt for ecosystem wallet. * **`ecosystem_wallet_sign_in_with_auth_endpoint(handle_id, payload)`**: Signs in with auth endpoint for ecosystem wallet. * **`ecosystem_wallet_sign_in_with_guest(handle_id, session_id)`**: Signs in with guest for ecosystem wallet. #### Smart Wallet * **`create_smart_wallet(client_id, bundle_id, secret_key, personal_wallet_handle_id, chain_id, gasless, factory, account_override)`**: Creates a smart wallet. * **`smart_wallet_is_deployed(handle_id)`**: Checks if the smart wallet is deployed. * **`smart_wallet_get_all_admins(handle_id)`**: Retrieves all admins of the smart wallet. * **`smart_wallet_get_all_active_signers(handle_id)`**: Retrieves all active signers of the smart wallet. * **`smart_wallet_create_session_key(handle_id, signer_address, approved_targets, approved_targets_count, native_token_limit_per_transaction_in_wei, permission_start_timestamp, permission_end_timestamp, req_validity_start_timestamp, req_validity_end_timestamp)`**: Creates a session key for the smart wallet. * **`smart_wallet_revoke_session_key(handle_id, signer_address)`**: Revokes a session key for the smart wallet. * **`smart_wallet_add_admin(handle_id, signer_address)`**: Adds an admin to the smart wallet. * **`smart_wallet_remove_admin(handle_id, signer_address)`**: Removes an admin from the smart wallet. #### Utility * **`get_wallet_address(handle_id)`**: Retrieves the wallet address. * **`sign_message(handle_id, message)`**: Signs a message with the wallet. * **`is_connected(handle_id)`**: Checks if the wallet is connected. * **`disconnect(handle_id)`**: Disconnects the wallet. * **`free_wallet(handle_id)`**: Frees the wallet handle. * **`free_ffi_result(result)`**: Frees the FFI result. * **`free_string(result)`**: Frees the string. * **`is_valid_address(address, check_checksum)`**: Validates an Ethereum address. * **`to_checksummed_address(address)`**: Converts an address to checksummed format. * **`is_valid_private_key(private_key)`**: Validates a private key. * **`compute_client_id_from_secret_key(secret_key)`**: Gets the client id of a secret key. * **`get_unix_timestamp_now()`**: Gets the current unix timestamp. * **`get_unix_timestamp_in_ten_years()`**: Gets the unix timestamp in 10 years. ## Unreal Engine SDK A Code Plugin for Unreal Engine that enables developers to create thirdweb In-App, Ecosystem and Smart Wallets for their games and applications. The plugin provides a simple API and blueprints to interact with wallets, login with email or socials as well as create Smart Wallet session keys. With this plugin, you can keep the onboarding of your users in-client and grant a session key to your[thirdweb Engine](https://portal.thirdweb.com/engine) powered backend to interact with the blockchain, no signature in sight. The Thirdweb Unreal Plugin is distributed as an [Unreal Marketplace Code Plugin](https://www.unrealengine.com/marketplace/en-US/product/f21200c2610146f3888172994448e50d). Unreal Engine SDK Unreal Engine SDK is open-source. View and contribute to its source code on GitHub. [GitHubView on GitHub](https://github.com/thirdweb-dev/unreal-sdk) ### Features * **Create and Login to In-App Wallets** \- unlocking email and social authentication to create persistent, cross-platform, cross-device and cross-sdk signless embedded wallets. * **Unlock the power of Account Abstraction** \- unlock the ability to sponsor gas and interact on behalf of users by upgrading any wallet to a Smart Wallet, and using Session Keys to grant scoped access to your backend - fully compatible with [thirdweb Engine](https://portal.thirdweb.com/engine) or other SDKs. * **Rust Core** \- the plugin's core logic is built from Rust, making it lightning-fast and minimizing the clutter in your Unreal project. * **Compatible with Unreal Engine 5.3-5.5** \- the plugin is compatible with the latest versions of Unreal Engine, allowing you to leverage the latest features and improvements. ### Installation Download and install the Thirdweb Unreal Plugin from the [Unreal Marketplace](https://www.unrealengine.com/marketplace/en-US/product/f21200c2610146f3888172994448e50d). Our plugin is coded using an intuitive handle system and blueprint async tasks, allowing you to interact with it very easily. ## Marketplace V3 design document. This is a live document that explains what the [thirdweb](https://thirdweb.com/) `Marketplace V3` smart contract is, how it works and can be used, and why it is written the way it is. The document is written for technical and non-technical readers. To ask further questions about `Marketplace V3`, please [visit our support site](https://thirdweb.com/contact-us) or create a [github issue](https://github.com/thirdweb-dev/contracts/issues). ### Background The [thirdweb](https://thirdweb.com/) `Marketplace V3` is a marketplace where people can sell NFTs — [ERC 721](https://eips.ethereum.org/EIPS/eip-721) or [ERC 1155](https://eips.ethereum.org/EIPS/eip-1155) tokens — at a fixed price ( what we'll refer to as a "Direct listing"), or auction them (what we'll refer to as an "Auction listing"). It also allows users to make "Offers" on unlisted NFTs. `Marketplace V3` offers improvements over previous version in terms of design and features, which are discussed in this document. You can refer to previous (v2) `Marketplace` design document [here](https://github.com/thirdweb-dev/contracts/blob/main/contracts/old-marketplace/marketplace.md). ### Context behind this update We have given `Marketplace` an update that was long overdue. The marketplace product is still made up of three core ways of exchanging NFTs for money: * Selling NFTs via a ‘direct listing'. * Auctioning off NFTs. * Making offers for NFTs not on sale at all, or at favorable prices. The core improvement of the `Marketplace V3` smart contract is better developer experience of working with the contract. Previous version had some limitations, arising due to (1) the smart contract size limit of `~24.576 kb` on Ethereum mainnet (and other thirdweb supported chains), and (2) the way the smart contract code is organized (single, large smart contract that inherits other contracts). The previous `Marketplace` smart contract has functions that have multiple jobs, behave in many different ways under different circumstances, and a lack of convenient view functions to read data easily. Moreover, over time, we received feature requests for `Marketplace`, some of which have been incorporated in `Marketplace V3`, for e.g.: * Ability to accept multiple currencies for direct listings * Ability to explicitly cancel listings * Explicit getter functions for fetching high level states e.g. “has an auction ended”, “who is the winning bidder”, etc. * Simplify start time and expiration time for listings For all these reasons and feature additions, the `Marketplace` contract is getting an update, and being rolled out as `Marketplace V3`. In this update: * the contract has been broken down into independent extensions (later offered in Solidity SDK). * the contract provides explicit functions for each important action (something that is missing from the contract, today). * the contract provides convenient view functions for all relevant state of the contract, without expecting users to rely on events to read critical information. Finally, to accomplish all these things without the constraint of the smart contract size limit, the `Marketplace V3` contract is written in the following new code pattern, which we call `Plugin Pattern`. It was influenced by [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535). You can read more about Plugin Pattern [here](https://blog.thirdweb.com/). ### Extensions that make up `Marketplace V3` The `Marketplace V3` smart contract is now written as the sum of three main extension smart contracts: * `DirectListings`: List NFTs for sale at a fixed price. Buy NFTs from listings. * `EnglishAuctions`: Put NFTs up for auction. Bid for NFTs up on auction. The highest bid within an auction's duration wins. * `Offers`: Make offers of ERC20 or native token currency for NFTs. Accept a favorable offer if you own the NFTs wanted. Each of these extension smart contracts is independent, and does not care about the state of the other extension contracts. #### What the Marketplace will look like to users There are two groups of users — (1) thirdweb's customers who'll set up the marketplace, and (2) the end users of thirdweb customers' marketplaces. To thirdweb customers, the marketplace can be set up like any of the other thirdweb contract (e.g. 'NFT Collection') through the thirdweb dashboard, the thirdweb SDK, or by directly consuming the open sourced marketplace smart contract. To the end users of thirdweb customers, the experience of using the marketplace will feel familiar to popular marketplace platforms like OpenSea, Zora, etc. The biggest difference in user experience will be that performing any action on the marketplace requires gas fees. * Thirdweb's customers * Deploy the marketplace contract like any other thirdweb contract. * Can set a % 'platform fee'. This % is collected on every sale — when a buyer buys tokens from a direct listing, and when a seller collects the highest bid on auction closing. This platform fee is distributed to the platform fee recipient (set by a contract admin). * Can list NFTs for sale at a fixed price. * Can edit an existing listing's parameters, e.g. the currency accepted. An auction's parameters cannot be edited once it has started. * Can make offers to NFTs listed/unlisted for a fixed price. * Can auction NFTs. * Can make bids to auctions. * Must pay gas fees to perform any actions, including the actions just listed. #### EIPs implemented / supported To be able to escrow NFTs in the case of auctions, Marketplace implements the receiver interfaces for [ERC1155](https://eips.ethereum.org/EIPS/eip-1155) and [ERC721](https://eips.ethereum.org/EIPS/eip-721) tokens. To enable meta-transactions (gasless), Marketplace implements [ERC2771](https://eips.ethereum.org/EIPS/eip-2771). Marketplace also honors [ERC2981](https://eips.ethereum.org/EIPS/eip-2981) for the distribution of royalties on direct and auction listings. #### Events emitted All events emitted by the contract, as well as when they're emitted, can be found in the interface of the contract, [here](https://github.com/thirdweb-dev/contracts/blob/main/contracts/marketplace/IMarketplace.sol). In general, events are emitted whenever there is a state change in the contract. #### Currency transfers The contract supports both ERC20 currencies and a chain's native token (e.g. ether for Ethereum mainnet). This means that any action that involves transferring currency (e.g. buying a token from a direct listing) can be performed with either an ERC20 token or the chain's native token. 💡 **Note**: The exception is offers — these can only be made with ERC20 tokens, since Marketplace needs to transfer the offer amount from the buyer to the seller, in case the latter accepts the offer. This cannot be done with native tokens without escrowing the requisite amount of currency. The contract wraps all native tokens deposited into it as the canonical ERC20 wrapped version of the native token (e.g. WETH for ether). The contract unwraps the wrapped native token when transferring native tokens to a given address. If the contract fails to transfer out native tokens, it wraps them back to wrapped native tokens, and transfers the wrapped native tokens to the concerned address. The contract may fail to transfer out native tokens to an address, if the address represents a smart contract that cannot accept native tokens transferred to it directly. ### API Reference for Extensions #### Direct listings The `DirectListings` extension smart contract lets you buy and sell NFTs (ERC-721 or ERC-1155) for a fixed price. #### `createListing` **What:** List NFTs (ERC721 or ERC1155) for sale at a fixed price. * Interface ```solidity struct ListingParameters { address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 pricePerToken; uint128 startTimestamp; uint128 endTimestamp; bool reserved; } function createListing(ListingParameters memory params) external returns (uint256 listingId); ``` * Parameters | Parameter | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | assetContract | The address of the smart contract of the NFTs being listed. | | tokenId | The tokenId of the NFTs being listed. | | quantity | The quantity of NFTs being listed. This must be non-zero, and is expected to be 1 for ERC-721 NFTs. | | currency | The currency in which the price must be paid when buying the listed NFTs. The address considered for native tokens of the chain is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE | | pricePerToken | The price to pay per unit of NFTs listed. | | startTimestamp | The UNIX timestamp at and after which NFTs can be bought from the listing. | | expirationTimestamp | The UNIX timestamp at and after which NFTs cannot be bought from the listing. | | reserved | Whether the listing is reserved to be bought from a specific set of buyers. | * Criteria that must be satisfied * The listing creator must own the NFTs being listed. * The listing creator must have already approved Marketplace to transfer the NFTs being listed (since the creator is not required to escrow NFTs in the Marketplace). * The listing creator must list a non-zero quantity of tokens. If listing ERC-721 tokens, the listing creator must list only quantity `1`. * The listing start time must not be less than 1+ hour before the block timestamp of the transaction. The listing end time must be after the listing start time. * Only ERC-721 or ERC-1155 tokens must be listed. * The listing creator must have `LISTER_ROLE` if role restrictions are active. * The asset being listed must have `ASSET_ROLE` if role restrictions are active. #### `updateListing` **What:** Update information (e.g. price) for one of your listings on the marketplace. * Interface ```solidity struct ListingParameters { address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 pricePerToken; uint128 startTimestamp; uint128 endTimestamp; bool reserved; } function updateListing(uint256 listingId, ListingParameters memory params) external ``` * Parameters | Parameter | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | listingId | The unique ID of the listing being updated. | | assetContract | The address of the smart contract of the NFTs being listed. | | tokenId | The tokenId of the NFTs being listed. | | quantity | The quantity of NFTs being listed. This must be non-zero, and is expected to be 1 for ERC-721 NFTs. | | currency | The currency in which the price must be paid when buying the listed NFTs. The address considered for native tokens of the chain is 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE | | pricePerToken | The price to pay per unit of NFTs listed. | | startTimestamp | The UNIX timestamp at and after which NFTs can be bought from the listing. | | expirationTimestamp | The UNIX timestamp at and after which NFTs cannot be bought from the listing. | | reserved | Whether the listing is reserved to be bought from a specific set of buyers. | * Criteria that must be satisfied * The caller of the function _must_ be the creator of the listing being updated. * The listing creator must own the NFTs being listed. * The listing creator must have already approved Marketplace to transfer the NFTs being listed (since the creator is not required to escrow NFTs in the Marketplace). * The listing creator must list a non-zero quantity of tokens. If listing ERC-721 tokens, the listing creator must list only quantity `1`. * Only ERC-721 or ERC-1155 tokens must be listed. * The listing start time must be greater than or equal to the incumbent start timestamp. The listing end time must be after the listing start time. * The asset being listed must have `ASSET_ROLE` if role restrictions are active. #### `cancelListing` **What:** Cancel (i.e. delete) one of your listings on the marketplace. * Interface ```solidity function cancelListing(uint256 listingId) external; ``` * Parameters | Parameter | Description | | --------- | --------------------------------------------------- | | listingId | The unique ID of the listing to cancel i.e. delete. | * Criteria that must be satisfied * The caller of the function _must_ be the creator of the listing being cancelled. * The listing must exist. #### `approveBuyerForListing` **What:** Approve a buyer to buy from a reserved listing. * Interface ```solidity function approveBuyerForListing( uint256 listingId, address buyer, bool toApprove ) external; ``` * Parameters | Parameter | Description | | --------- | ------------------------------------------------------------ | | listingId | The unique ID of the listing. | | buyer | The address of the buyer to approve to buy from the listing. | | toApprove | Whether to approve the buyer to buy from the listing. | * Criteria that must be satisfied * The caller of the function _must_ be the creator of the listing in question. * The listing must be reserved. #### `approveCurrencyForListing` **What:** Approve a currency as a form of payment for the listing. * Interface ```solidity function approveCurrencyForListing( uint256 listingId, address currency, uint256 pricePerTokenInCurrency, ) external; ``` * Parameters | Parameter | Description | | ----------------------- | ----------------------------------------------------------------------------------------- | | listingId | The unique ID of the listing. | | currency | The address of the currency to approve as a form of payment for the listing. | | pricePerTokenInCurrency | The price per token for the currency to approve. A value of 0 here disapprove a currency. | * Criteria that must be satisfied * The caller of the function _must_ be the creator of the listing in question. * The currency being approved must not be the main currency accepted by the listing. #### `buyFromListing` **What:** Buy NFTs from a listing. * Interface ```solidity function buyFromListing( uint256 listingId, address buyFor, uint256 quantity, address currency, uint256 expectedTotalPrice ) external payable; ``` * Parameters | Parameter | Description | | ------------------ | ---------------------------------------------------------- | | listingId | The unique ID of the listing to buy NFTs from. | | buyFor | The recipient of the NFTs being bought. | | quantity | The quantity of NFTs to buy from the listing. | | currency | The currency to use to pay for NFTs. | | expectedTotalPrice | The expected total price to pay for the NFTs being bought. | * Criteria that must be satisfied * The buyer must own the total price amount to pay for the NFTs being bought. * The buyer must approve the Marketplace to transfer the total price amount to pay for the NFTs being bought. * If paying in native tokens, the buyer must send exactly the expected total price amount of native tokens along with the transaction. * The buyer's expected total price must match the actual total price for the NFTs being bought. * The buyer must buy a non-zero quantity of NFTs. * The buyer must not attempt to buy more NFTs than are listed at the time. * The buyer must pay in a currency approved by the listing creator. #### `totalListings` **What:** Returns the total number of listings created so far. * Interface ```solidity function totalListings() external view returns (uint256); ``` #### `getAllListings` **What:** Returns all listings between the start and end Id (both inclusive) provided. * Interface ```solidity enum TokenType { ERC721, ERC1155 } enum Status { UNSET, CREATED, COMPLETED, CANCELLED } struct Listing { uint256 listingId; address listingCreator; address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 pricePerToken; uint128 startTimestamp; uint128 endTimestamp; bool reserved; TokenType tokenType; Status status; } function getAllListings(uint256 startId, uint256 endId) external view returns (Listing[] memory listings); ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | startId | Inclusive start listing Id | | endId | Inclusive end listing Id | #### `getAllValidListings` **What:** Returns all valid listings between the start and end Id (both inclusive) provided. A valid listing is where the listing is active, as well as the creator still owns and has approved Marketplace to transfer the listed NFTs. * Interface ```solidity function getAllValidListings(uint256 startId, uint256 endId) external view returns (Listing[] memory listings); ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | startId | Inclusive start listing Id | | endId | Inclusive end listing Id | #### `getListing` **What:** Returns a listing at the provided listing ID. * Interface ```solidity function getListing(uint256 listingId) external view returns (Listing memory listing); ``` * Parameters | Parameter | Description | | --------- | ------------------------------- | | listingId | The ID of the listing to fetch. | ### English auctions The `EnglishAuctions` extension smart contract lets you sell NFTs (ERC-721 or ERC-1155) in an english auction. #### `createAuction` **What:** Put up NFTs (ERC721 or ERC1155) for an english auction. * **What is an English auction?** * `Alice` deposits her NFTs in the Marketplace contract and specifies: **\[1\]** a minimum bid amount, and **\[2\]** a duration for the auction. * `Bob` is the first person to make a bid. * _Before_ the auction duration ends, `Bob` makes a bid in the auction (≥ minimum bid). * `Bob`'s bid is now deposited and locked in the Marketplace. * `Tom` also wants the auctioned NFTs. `Tom`'s bid _must_ be greater than `Bob`'s bid. * _Before_ the auction duration ends, `Tom` makes a bid in the auction (≥ `Bob`'s bid). * `Tom`'s bid is now deposited and locked in the Marketplace. `Bob`'s is _automatically_ refunded his bid. * _After_ the auction duration ends: * `Alice` collects the highest bid that has been deposited in Marketplace. * The “highest bidder” e.g. `Tom` collects the auctioned NFTs. * Interface ```solidity struct AuctionParameters { address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 minimumBidAmount; uint256 buyoutBidAmount; uint64 timeBufferInSeconds; uint64 bidBufferBps; uint64 startTimestamp; uint64 endTimestamp; } function createAuction(AuctionParameters memory params) external returns (uint256 auctionId); ``` * Parameters | Parameter | Description | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | assetContract | The address of the smart contract of the NFTs being auctioned. | | tokenId | The tokenId of the NFTs being auctioned. | | quantity | The quantity of NFTs being auctioned. This must be non-zero, and is expected to be 1 for ERC-721 NFTs. | | currency | The currency in which the bid must be made when bidding for the auctioned NFTs. | | minimumBidAmount | The minimum bid amount for the auction. | | buyoutBidAmount | The total bid amount for which the bidder can directly purchase the auctioned items and close the auction as a result. | | timeBufferInSeconds | This is a buffer e.g. x seconds. If a new winning bid is made less than x seconds before expirationTimestamp, the expirationTimestamp is increased by x seconds. | | bidBufferBps | This is a buffer in basis points e.g. x%. To be considered as a new winning bid, a bid must be at least x% greater than the current winning bid. | | startTimestamp | The timestamp at and after which bids can be made to the auction | | expirationTimestamp | The timestamp at and after which bids cannot be made to the auction. | * Criteria that must be satisfied * The auction creator must own and approve Marketplace to transfer the auctioned tokens to itself. * The auction creator must auction a non-zero quantity of tokens. If the auctioned token is ERC721, the quantity must be `1`. * The auction creator must specify a non-zero time and bid buffers. * The minimum bid amount must be less than the buyout bid amount. * The auction start time must not be less than 1+ hour before the block timestamp of the transaction. The auction end time must be after the auction start time. * The auctioned token must be ERC-721 or ERC-1155. * The auction creator must have `LISTER_ROLE` if role restrictions are active. * The asset being auctioned must have `ASSET_ROLE` if role restrictions are active. #### `cancelAuction` **What:** Cancel an auction. * Interface ```solidity function cancelAuction(uint256 auctionId) external; ``` * Parameters | Parameter | Description | | --------- | --------------------------------------- | | auctionId | The unique ID of the auction to cancel. | * Criteria that must be satisfied * The caller of the function must be the auction creator. * There must be no bids placed in the ongoing auction. (Default true for all auctions that haven't started) #### `collectAuctionPayout` **What:** Once the auction ends, collect the highest bid made for your auctioned NFTs. * Interface ```solidity function collectAuctionPayout(uint256 auctionId) external; ``` * Parameters | Parameter | Description | | --------- | ------------------------------------------------------- | | auctionId | The unique ID of the auction to collect the payout for. | * Criteria that must be satisfied * The auction must be expired. * The auction must have received at least one valid bid. #### `collectAuctionTokens` **What:** Once the auction ends, collect the auctioned NFTs for which you were the highest bidder. * Interface ```solidity function collectAuctionTokens(uint256 auctionId) external; ``` * Parameters | Parameter | Description | | --------- | ------------------------------------------------------- | | auctionId | The unique ID of the auction to collect the payout for. | * Criteria that must be satisfied * The auction must be expired. * The caller must be the winning bidder. #### `bidInAuction` **What:** Make a bid in an auction. * Interface ```solidity function bidInAuction(uint256 auctionId, uint256 bidAmount) external payable; ``` * Parameters | Parameter | Description | | --------- | --------------------------------------- | | auctionId | The unique ID of the auction to bid in. | | bidAmount | The total bid amount. | * Criteria that must be satisfied * Auction must not be expired. * The caller must own and approve Marketplace to transfer the requisite bid amount to itself. * The bid amount must be a winning bid amount. (For convenience, this can be verified by calling `isNewWinningBid`) #### `isNewWinningBid` **What:** Check whether a given bid amount would make for a new winning bid. * Interface ```solidity function isNewWinningBid(uint256 auctionId, uint256 bidAmount) external view returns (bool); ``` * Parameters | Parameter | Description | | --------- | --------------------------------------- | | auctionId | The unique ID of the auction to bid in. | | bidAmount | The total bid amount. | * Criteria that must be satisfied * The auction must not have been cancelled or expired. #### `totalAuctions` **What:** Returns the total number of auctions created so far. * Interface ```solidity function totalAuctions() external view returns (uint256); ``` #### `getAuction` **What:** Fetch the auction info at a particular auction ID. * Interface ```solidity struct Auction { uint256 auctionId; address auctionCreator; address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 minimumBidAmount; uint256 buyoutBidAmount; uint64 timeBufferInSeconds; uint64 bidBufferBps; uint64 startTimestamp; uint64 endTimestamp; TokenType tokenType; Status status; } function getAuction(uint256 auctionId) external view returns (Auction memory auction); ``` * Parameters | Parameter | Description | | --------- | ----------------------------- | | auctionId | The unique ID of the auction. | #### `getAllAuctions` **What:** Returns all auctions between the start and end Id (both inclusive) provided. * Interface ```solidity function getAllAuctions(uint256 startId, uint256 endId) external view returns (Auction[] memory auctions); ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | startId | Inclusive start auction Id | | endId | Inclusive end auction Id | #### `getAllValidAuctions` **What:** Returns all valid auctions between the start and end Id (both inclusive) provided. A valid auction is where the auction is active, as well as the creator still owns and has approved Marketplace to transfer the auctioned NFTs. * Interface ```solidity function getAllValidAuctions(uint256 startId, uint256 endId) external view returns (Auction[] memory auctions); ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | startId | Inclusive start auction Id | | endId | Inclusive end auction Id | #### `getWinningBid` **What:** Get the winning bid of an auction. * Interface ```solidity function getWinningBid(uint256 auctionId) external view returns ( address bidder, address currency, uint256 bidAmount ); ``` * Parameters | Parameter | Description | | --------- | ---------------------------- | | auctionId | The unique ID of an auction. | #### `isAuctionExpired` **What:** Returns whether an auction is expired or not. * Interface ```solidity function isAuctionExpired(uint256 auctionId) external view returns (bool); ``` * Parameters | Parameter | Description | | --------- | ---------------------------- | | auctionId | The unique ID of an auction. | ### Offers #### `makeOffer` **What:** Make an offer for any ERC721 or ERC1155 NFTs (unless `ASSET_ROLE` restrictions apply) * Interface ```solidity struct OfferParams { address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 totalPrice; uint256 expirationTimestamp; } function makeOffer(OfferParams memory params) external returns (uint256 offerId); ``` * Parameters | Parameter | Description | | ------------------- | ----------------------------------------- | | assetContract | The contract address of the NFTs wanted. | | tokenId | The tokenId of the NFTs wanted. | | quantity | The quantity of NFTs wanted. | | currency | The currency offered for the NFT wanted. | | totalPrice | The price offered for the NFTs wanted. | | expirationTimestamp | The timestamp at which the offer expires. | * Criteria that must be satisfied * The offeror must own and approve Marketplace to transfer the requisite amount currency offered for the NFTs wanted. * The offeror must make an offer for non-zero quantity of NFTs. If offering for ERC721 tokens, the quantity wanted must be `1`. * Expiration timestamp must be greater than block timestamp, or within 1 hour of block timestamp. #### `cancelOffer` **What:** Cancel an existing offer. * Interface ```solidity function cancelOffer(uint256 offerId) external; ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | offerId | The unique ID of the offer | * Criteria that must be satisfied * The caller of the function must be the offeror. #### `acceptOffer` **What:** Accept an offer made for your NFTs. * Interface ```solidity function acceptOffer(uint256 offerId) external; ``` * Parameters | Parameter | Description | | --------- | --------------------------- | | offerId | The unique ID of the offer. | * Criteria that must be satisfied * The caller of the function must own and approve Marketplace to transfer the tokens for which the offer is made. * The offeror must still own and have approved Marketplace to transfer the requisite amount currency offered for the NFTs wanted. #### `totalOffers` **What:** Returns the total number of offers created so far. * Interface ```solidity function totalOffers() external view returns (uint256); ``` #### `getOffer` **What:** Returns the offer at a particular offer Id. * Interface ```solidity struct Offer { uint256 offerId; address offeror; address assetContract; uint256 tokenId; uint256 quantity; address currency; uint256 totalPrice; uint256 expirationTimestamp; TokenType tokenType; Status status; } function getOffer(uint256 offerId) external view returns (Offer memory offer); ``` * Parameters | Parameter | Description | | --------- | -------------------------- | | offerId | The unique ID of an offer. | #### `getAllOffers` **What:** Returns all offers between the start and end Id (both inclusive) provided. * Interface ```solidity function getAllOffers(uint256 startId, uint256 endId) external view returns (Offer[] memory offers); ``` * Parameters | Parameter | Description | | --------- | ------------------------ | | startId | Inclusive start offer Id | | endId | Inclusive end offer Id | #### `getAllValidOffers` **What:** Returns all valid offers between the start and end Id (both inclusive) provided. A valid offer is where the offer is active, as well as the offeror still owns and has approved Marketplace to transfer the currency tokens. * Interface ```solidity function getAllValidOffer(uint256 startId, uint256 endId) external view returns (Offer[] memory offers); ``` * Parameters | Parameter | Description | | --------- | ------------------------ | | startId | Inclusive start offer Id | | endId | Inclusive end offer Id | ## Abi Contract [ ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html#json) `type Abi = readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)> ` ## AbiConstructor ABI [ "constructor"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type `type AbiConstructor = { inputs: readonly Array; payable?: boolean; stateMutability: Extract; type: "constructor" } ` ##### inputs `type inputs = readonly Array ` ##### payable Deprecated use `payable` or `nonpayable` from AbiStateMutability instead https://github.com/ethereum/solidity/issues/992 `type payable = boolean; ` ##### stateMutability `type stateMutability = Extract< AbiStateMutability, "payable" | "nonpayable" >; ` ##### type `type type = "constructor"; ` ## AbiEvent ABI [ "event"](https://docs.soliditylang.org/en/latest/abi-spec.html#events) type `type AbiEvent = { anonymous?: boolean; inputs: readonly Array; name: string; type: "event" } ` ##### anonymous `type anonymous = boolean; ` ##### inputs `type inputs = readonly Array ` ##### name `type name = string; ` ##### type `type type = "event"; ` ## AbiFallback ABI [ "fallback"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type `type AbiFallback = { payable?: boolean; stateMutability: Extract< AbiStateMutability, "payable" | "nonpayable" >; type: "fallback"; }; ` ##### payable Deprecated use `payable` or `nonpayable` from AbiStateMutability instead https://github.com/ethereum/solidity/issues/992 `type payable = boolean; ` ##### stateMutability `type stateMutability = Extract< AbiStateMutability, "payable" | "nonpayable" >; ` ##### type `type type = "fallback"; ` ## AbiFunction ABI [ "function"](https://docs.soliditylang.org/en/latest/abi-spec.html#json) type `type AbiFunction = { constant?: boolean; gas?: number; inputs: readonly Array; name: string; outputs: readonly Array; payable?: boolean; stateMutability: AbiStateMutability; type: "function" } ` ##### constant Deprecated use `pure` or `view` from AbiStateMutability instead https://github.com/ethereum/solidity/issues/992 `type constant = boolean; ` ##### gas Deprecated Vyper used to provide gas estimates https://github.com/vyperlang/vyper/issues/2151 `type gas = number; ` ##### inputs `type inputs = readonly Array ` ##### name `type name = string; ` ##### outputs `type outputs = readonly Array ` ##### payable Deprecated use `payable` or `nonpayable` from AbiStateMutability instead https://github.com/ethereum/solidity/issues/992 `type payable = boolean; ` ##### stateMutability `type stateMutability = AbiStateMutability; ` ##### type `type type = "function"; ` ## AbiReceive ABI [ "receive"](https://docs.soliditylang.org/en/latest/contracts.html#receive-ether-function) type `type AbiReceive = { stateMutability: Extract; type: "receive"; }; ` ##### stateMutability `type stateMutability = Extract; ` ##### type `type type = "receive"; ` ## AbiError ABI [ "error"](https://docs.soliditylang.org/en/latest/abi-spec.html#errors) type `type AbiError = { inputs: readonly Array; name: string; type: "error" } ` ##### inputs `type inputs = readonly Array ` ##### name `type name = string; ` ##### type `type type = "error"; ` ## AcceptedOfferEventFilters Represents the filters for the "AcceptedOffer" event. `type AcceptedOfferEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; offerId: AbiParameterToPrimitiveType<{ indexed: true; name: "offerId"; type: "uint256"; }>; offeror: AbiParameterToPrimitiveType<{ indexed: true; name: "offeror"; type: "address"; }>; }>; ` ## Account Account interface Refer to [ Account vs Wallet](https://portal.thirdweb.com/typescript/v5/wallets) to understand the difference between `Account` and `Wallet` interface `type Account = { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` ##### address address of the account `type address = Address; ` ##### estimateGas ##### Signature `function estimateGas(tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)): Promise; ` ##### Parameters ##### tx ###### Type `let tx: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### onTransactionRequested ##### Signature `function onTransactionRequested( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ): Promise; ` ##### Parameters ##### transaction ###### Type `let transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### sendBatchTransaction ##### Signature `function sendBatchTransaction( txs: Array, ): Promise; ` ##### Parameters ##### txs ###### Type `let txs: Array; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### sendRawTransaction ##### Signature `function sendRawTransaction( tx: SendRawTransactionOptions, ): Promise; ` ##### Parameters ##### tx ###### Type `let tx: SendRawTransactionOptions; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### sendTransaction ##### Signature `function sendTransaction( tx: SendTransactionOption, ): Promise; ` ##### Parameters ##### tx ###### Type `let tx: SendTransactionOption; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### signAuthorization ##### Signature `function signAuthorization( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ): Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; ` ##### Parameters ##### authorization ###### Type `let authorization: { address: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); chainId: number; nonce: bigint; }; ` ##### Returns ##### Return Type `let returnType: ox__Authorization.ListSigned[number]; ` ##### signMessage ##### Signature `function signMessage({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }): Promise; ` ##### Parameters ##### { message, originalMessage, chainId, } ###### Type `let { message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string } ` ##### Returns ##### Return Type `let returnType: ox__Hex.Hex; ` ##### signTransaction ##### Signature `function signTransaction(tx: SerializableTransaction): Promise; ` ##### Parameters ##### tx ###### Type `let tx: SerializableTransaction; ` ##### Returns ##### Return Type `let returnType: ox__Hex.Hex; ` ##### signTypedData ##### Signature `function signTypedData( _typedData: ox__TypedData.Definition, ): Promise; ` ##### Parameters ##### \_typedData ###### Type `let _typedData: ox__TypedData.Definition; ` ##### Returns ##### Return Type `let returnType: ox__Hex.Hex; ` ##### watchAsset ##### Signature `function watchAsset(asset: WatchAssetParams): Promise; ` ##### Parameters ##### asset The asset to watch. ###### Type `let asset: WatchAssetParams; ` ##### Returns ##### Return Type `let returnType: Promise; ` ## AccountBalanceInfo `type AccountBalanceInfo = { balance: number; symbol: string }; ` ##### balance Represents either token balance or fiat balance. `type balance = number; ` ##### symbol Represents either token symbol or fiat symbol `type symbol = string; ` ## AccountProvider A React context provider component that supplies Account-related data to its child components. This component serves as a wrapper around the `AccountProviderContext.Provider` and passes the provided account data down to all of its child components through the context API. ### Example `import { AccountProvider, AccountAvatar, AccountName, AccountAddress, } from "thirdweb/react"; ; ` ##### Signature `function AccountProvider( props: PropsWithChildren<[AccountProviderProps](https://portal.thirdweb.com/references/typescript/v5/AccountProviderProps)>, ): Element; ` ### Parameters ##### props #### Type `let props: PropsWithChildren<[AccountProviderProps](https://portal.thirdweb.com/references/typescript/v5/AccountProviderProps)>; ` ### Returns ##### Return Type `let returnType: Element; ` ## AccountBlobbie A wrapper for the Blobbie component ##### Signature `function AccountBlobbie( props: Omit, ): Element; ` ### Parameters ##### props BlobbieProps #### Type `let props: Omit; ` ### Returns ##### Return Type `let returnType: Element; ` ## AdapterWalletOptions `type AdapterWalletOptions = { adaptedAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onDisconnect: () => Promise | void; switchChain: (chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)) => Promise | void; }; ` ##### adaptedAccount `type adaptedAccount = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### onDisconnect ##### Signature `function onDisconnect(): Promise | void; ` ##### Returns ##### Return Type `let returnType: Promise | void; ` ##### switchChain ##### Signature `function switchChain(chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)): Promise | void; ` ##### Parameters ##### chain ###### Type `let chain: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### Returns ##### Return Type `let returnType: Promise | void; ` ## AddAdminOptions `type AddAdminOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); adminAddress: string }; ` ##### account The admin account that will perform the operation. `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### adminAddress The address to add as an admin. `type adminAddress = string; ` ## AccountProviderProps Props for the `` component `type AccountProviderProps = { address: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### address The user's wallet address `type address = string; ` ##### client thirdweb Client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## AddMessage `type AddMessage = { deadline: bigint; key: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); keyType: number; metadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); metadataType: number; nonce: bigint; owner: Address; }; ` ##### deadline Unix timestamp when this message expires `type deadline = bigint; ` ##### key Public key to register onchain `type key = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### keyType Key type. The only currently supported key type is 1, for EdDSA signers. `type keyType = number; ` ##### metadata ABI-encoded SignedKeyRequestMetadata struct `type metadata = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### metadataType Metadata type. The only currently supported metadata type is 1. `type metadataType = number; ` ##### nonce KeyGateway nonce for signer address `type nonce = bigint; ` ##### owner FID owner address `type owner = Address; ` ## AddParams Represents the parameters for the "add" function. `type AddParams = WithOverrides<{ chainId: AbiParameterToPrimitiveType<{ name: "_chainId"; type: "uint256"; }>; deployer: AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; deployment: AbiParameterToPrimitiveType<{ name: "_deployment"; type: "address"; }>; metadataUri: AbiParameterToPrimitiveType<{ name: "metadataUri"; type: "string"; }>; }>; ` ## AddSessionKeyOptions `type AddSessionKeyOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); permissions: AccountPermissions; sessionKeyAddress: string; }; ` ##### account The admin account that will perform the operation. `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### permissions The permissions to assign to the session key. `type permissions = AccountPermissions; ` ##### sessionKeyAddress The address to add as a session key. `type sessionKeyAddress = string; ` ## AddSignerForParams Represents the parameters for the `addSignerFor` function. `type AddSignerForParams = Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) & ( | { userAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { addSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); deadline: bigint; userAddress: Address } ) >; ` ## AddSignerParams Represents the parameters for the `addSigner` function. `type AddSignerParams = Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) >; ` ## Aggregate3Params Represents the parameters for the "aggregate3" function. `type Aggregate3Params = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "allowFailure"; type: "bool" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; }>; ` ## AggregateParams Represents the parameters for the "aggregate" function. `type AggregateParams = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; }>; ` ## AbiParameterToPrimitiveType Converts AbiParameter to corresponding TypeScript primitive type. `` type AbiParameterToPrimitiveType< abiParameter extends AbiParameter | { name: string; type: unknown }, abiParameterKind extends AbiParameterKind = AbiParameterKind, > = abiParameter["type"] extends AbiBasicType ? AbiTypeToPrimitiveType : abiParameter extends { components: infer components; type: SolidityTuple; } ? AbiComponentsToPrimitiveType : MaybeExtractArrayParameterType extends [ infer head, infer size, ] ? AbiArrayToPrimitiveType< abiParameter, abiParameterKind, head, size > : ResolvedRegister["strictAbiType"] extends true ? Error<`Unknown type '${abiParameter["type"] & string}'.`> : abiParameter extends { components: Error } ? abiParameter["components"] : unknown; `` ## AirdropERC1155Params Represents the parameters for the "airdropERC1155" function. `type AirdropERC1155Params = WithOverrides<{ contents: AbiParameterToPrimitiveType<{ components: [ { name: "recipient"; type: "address" }, { name: "tokenId"; type: "uint256" }, { name: "amount"; type: "uint256" }, ]; name: "_contents"; type: "tuple[]"; }>; tokenAddress: AbiParameterToPrimitiveType<{ name: "_tokenAddress"; type: "address"; }>; }>; ` ## Aggregate3ValueParams Represents the parameters for the "aggregate3Value" function. `type Aggregate3ValueParams = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "allowFailure"; type: "bool" }, { name: "value"; type: "uint256" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; }>; ` ## AirdropERC20Params Represents the parameters for the "airdropERC20" function. `type AirdropERC20Params = WithOverrides<{ contents: AbiParameterToPrimitiveType<{ components: [ { name: "recipient"; type: "address" }, { name: "amount"; type: "uint256" }, ]; name: "_contents"; type: "tuple[]"; }>; tokenAddress: AbiParameterToPrimitiveType<{ name: "_tokenAddress"; type: "address"; }>; }>; ` ## AirdropERC721Params Represents the parameters for the "airdropERC721" function. `type AirdropERC721Params = WithOverrides<{ contents: AbiParameterToPrimitiveType<{ components: [ { name: "recipient"; type: "address" }, { name: "tokenId"; type: "uint256" }, ]; name: "_contents"; type: "tuple[]"; }>; tokenAddress: AbiParameterToPrimitiveType<{ name: "_tokenAddress"; type: "address"; }>; }>; ` ## AirdropNativeTokenParams Represents the parameters for the "airdropNativeToken" function. `type AirdropNativeTokenParams = WithOverrides<{ contents: AbiParameterToPrimitiveType<{ components: [ { name: "recipient"; type: "address" }, { name: "amount"; type: "uint256" }, ]; name: "_contents"; type: "tuple[]"; }>; }>; ` ## AllowanceParams Represents the parameters for the "allowance" function. `type AllowanceParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; spender: AbiParameterToPrimitiveType<{ name: "spender"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ##### spender `type spender = AbiParameterToPrimitiveType<{ name: "spender"; type: "address"; }>; ` ## ApprovalEventFilters Represents the filters for the "Approval" event. `type ApprovalEventFilters = Partial<{ approved: AbiParameterToPrimitiveType<{ indexed: true; name: "approved"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ indexed: true; name: "owner"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ indexed: true; name: "tokenId"; type: "uint256"; }>; }>; ` ## ApprovalEventFilters Represents the filters for the "Approval" event. `type ApprovalEventFilters = Partial<{ owner: AbiParameterToPrimitiveType<{ indexed: true; name: "owner"; type: "address"; }>; spender: AbiParameterToPrimitiveType<{ indexed: true; name: "spender"; type: "address"; }>; }>; ` ## ApprovalForAllEventFilters Represents the filters for the "ApprovalForAll" event. `type ApprovalForAllEventFilters = Partial<{ _operator: AbiParameterToPrimitiveType<{ indexed: true; name: "_operator"; type: "address"; }>; _owner: AbiParameterToPrimitiveType<{ indexed: true; name: "_owner"; type: "address"; }>; }>; ` ## ApprovalForAllEventFilters Represents the filters for the "ApprovalForAll" event. `type ApprovalForAllEventFilters = Partial<{ operator: AbiParameterToPrimitiveType<{ indexed: true; name: "operator"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ indexed: true; name: "owner"; type: "address"; }>; }>; ` ## ApproveBuyerForListingParams Represents the parameters for the "approveBuyerForListing" function. `type ApproveBuyerForListingParams = WithOverrides<{ buyer: AbiParameterToPrimitiveType<{ name: "_buyer"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ name: "_listingId"; type: "uint256"; }>; toApprove: AbiParameterToPrimitiveType<{ name: "_toApprove"; type: "bool"; }>; }>; ` ## ApproveCurrencyForListingParams Represents the parameters for the "approveCurrencyForListing" function. `type ApproveCurrencyForListingParams = WithOverrides<{ currency: AbiParameterToPrimitiveType<{ name: "_currency"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ name: "_listingId"; type: "uint256"; }>; pricePerTokenInCurrency: AbiParameterToPrimitiveType<{ name: "_pricePerTokenInCurrency"; type: "uint256"; }>; }>; ` ## ApproveParams Represents the parameters for the `approve` function. `type ApproveParams = Prettify< { spender: Address } & ( | { amount: number | string } | { amountWei: bigint } ) >; ` ## ApproveParams Represents the parameters for the "approve" function. `type ApproveParams = WithOverrides<{ to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }>; ` ## AsyncStorage `type AsyncStorage = { getItem: (key: string) => Promise; removeItem: (key: string) => Promise; setItem: (key: string, value: string) => Promise; }; ` ##### getItem ##### Signature `function getItem(key: string): Promise; ` ##### Parameters ##### key ###### Type `let key: string; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### removeItem ##### Signature `function removeItem(key: string): Promise; ` ##### Parameters ##### key ###### Type `let key: string; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### setItem ##### Signature `function setItem(key: string, value: string): Promise; ` ##### Parameters ##### key ###### Type `let key: string; ` ##### value ###### Type `let value: string; ` ##### Returns ##### Return Type `let returnType: Promise; ` ## AuctionClosedEventFilters Represents the filters for the "AuctionClosed" event. `type AuctionClosedEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; auctionId: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionId"; type: "uint256"; }>; closer: AbiParameterToPrimitiveType<{ indexed: true; name: "closer"; type: "address"; }>; }>; ` ## AuthOptions `type AuthOptions = { adminAccount?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client?: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); domain: string; jwt?: { expirationTimeSeconds?: number; jwtId?: { generate: () => string | Promise; validate: (jwtId: string) => boolean | Promise; }; }; login?: { nonce?: { generate: () => string | Promise; validate: (nonce: string) => boolean | Promise; }; payloadExpirationTimeSeconds?: number; resources?: Array; statement?: string; uri?: string; version?: string; }; }; ` ##### adminAccount `type adminAccount = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### domain `type domain = string; ` ##### jwt `type jwt = { expirationTimeSeconds?: number; jwtId?: { generate: () => string | Promise; validate: (jwtId: string) => boolean | Promise; }; }; ` ##### login `type login = { nonce?: { generate: () => string | Promise; validate: (nonce: string) => boolean | Promise; }; payloadExpirationTimeSeconds?: number; resources?: Array; statement?: string; uri?: string; version?: string; }; ` ## AuthorizationRequest An EIP-7702 authorization object fully prepared and ready for signing. `type AuthorizationRequest = { address: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); chainId: number; nonce: bigint; }; ` ##### address `type address = [Address](https://portal.thirdweb.com/references/typescript/v5/Address); ` ##### chainId `type chainId = number; ` ##### nonce `type nonce = bigint; ` ## AutoConnect AutoConnect last connected wallet on page reload or revisit. Note: If you are using `ConnectButton` or `ConnectEmbed` components, You don't need to use this component as it is already included. This is useful if you are manually connecting the wallets using the [useConnect](https://portal.thirdweb.com/references/typescript/v5/useConnect) hook and want to auto connect the last connected wallets on page reload or revisit. You can also use the [useAutoConnect](https://portal.thirdweb.com/references/typescript/v5/useAutoConnect) hook to achieve the same result. To check if the wallet in in the process of auto connecting, you can use the [useIsAutoConnecting](https://portal.thirdweb.com/references/typescript/v5/useIsAutoConnecting) hook. ### Example `import { AutoConnect } from "thirdweb/react"; import { createWallet, inAppWallet } from "thirdweb/wallets"; // list of wallets that your app uses const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("me.rainbow"), ]; function Example() { return ( ); } ` ##### Signature `function AutoConnect(props: [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps)): Element; ` ### Parameters ##### props Object of type `AutoConnectProps` . Refer to [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps) #### Type `let props: { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; onTimeout?: () => void; timeout?: number; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ### Returns ##### Return Type `let returnType: Element; ` ## AutoConnectProps `type AutoConnectProps = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; onTimeout?: () => void; timeout?: number; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ##### accountAbstraction Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options. If you are connecting to smart wallet using personal wallet - setting this configuration will autoConnect the personal wallet and then connect to the smart wallet. ` ` `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### appMetadata Metadata of the app that will be passed to connected wallet. Setting this is highly recommended. Some wallets display this information to the user when they connect to your app. `type appMetadata = AppMetadata; ` ### Example `{ name: "My App", url: "https://my-app.com", description: "some description about your app", logoUrl: "https://path/to/my-app/logo.svg", }; ` ##### chain Optional chain to autoconnect to `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### onConnect ##### Signature `function onConnect(wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)): void; ` ##### Parameters ##### wallet ###### Type `let wallet: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onTimeout ##### Signature `function onTimeout(): void; ` ##### Returns ##### Return Type `let returnType: void; ` ##### timeout if the autoConnection does not succeed within given timeout in milliseconds, it will be cancelled. By default, the timeout is set to 15000ms (15 seconds). `; ` `type timeout = number; ` ##### wallets Array of wallets that your app uses `type wallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ### Example `import { AutoConnect } from "thirdweb/react"; import { createWallet, inAppWallet } from "thirdweb/wallets"; const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), ]; function Example() { return ; } ` ## BalanceOfParams Represents the parameters for the "balanceOf" function. `type BalanceOfParams = { owner: AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## BalanceOfBatchParams Represents the parameters for the "balanceOfBatch" function. `type BalanceOfBatchParams = { owners: AbiParameterToPrimitiveType<{ name: "_owners"; type: "address[]"; }>; tokenIds: AbiParameterToPrimitiveType<{ name: "tokenIds"; type: "uint256[]"; }>; }; ` ##### owners `type owners = AbiParameterToPrimitiveType<{ name: "_owners"; type: "address[]"; }>; ` ##### tokenIds `type tokenIds = AbiParameterToPrimitiveType<{ name: "tokenIds"; type: "uint256[]"; }>; ` ## BatchToReveal `type BatchToReveal = { batchId: bigint; batchUri: string; placeholderMetadata: undefined | NFTMetadata; }; ` ##### batchId `type batchId = bigint; ` ##### batchUri `type batchUri = string; ` ##### placeholderMetadata `type placeholderMetadata = undefined | [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); ` ## BiconomyOptions `type BiconomyOptions = { apiId: string; apiKey: string; deadlineSeconds?: number; provider: "biconomy"; relayerForwarderAddress: Address; }; ` ##### apiId `type apiId = string; ` ##### apiKey `type apiKey = string; ` ##### deadlineSeconds `type deadlineSeconds = number; ` ##### provider `type provider = "biconomy"; ` ##### relayerForwarderAddress `type relayerForwarderAddress = Address; ` ## BalanceOfParams Represents the parameters for the "balanceOf" function. `type BalanceOfParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## BlockAndAggregateParams Represents the parameters for the "blockAndAggregate" function. `type BlockAndAggregateParams = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; }>; ` ## Blobbie A unique gradient avatar based on the provided address. ### Example `import { Blobbie } from "thirdweb/react"; ; ` ##### Signature `function Blobbie(props: BlobbieProps): Element; ` ### Parameters ##### props The component props. #### Type `let props: BlobbieProps; ` ### Returns ##### Return Type `let returnType: Element; ` ## BaseTransactionOptions `type BaseTransactionOptions< T extends object = object, abi extends Abi = any, > = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ## BurnBatchParams Represents the parameters for the "burnBatch" function. `type BurnBatchParams = WithOverrides<{ account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ids: AbiParameterToPrimitiveType<{ name: "ids"; type: "uint256[]"; }>; values: AbiParameterToPrimitiveType<{ name: "values"; type: "uint256[]"; }>; }>; ` ## BidInAuctionParams `type BidInAuctionParams = { auctionId: bigint } & ( | { bidAmountWei: bigint } | { bidAmount: string } ); ` ## BurnParams Represents the parameters for the "burn" function. `type BurnParams = WithOverrides<{ tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }>; ` ## BurnParams Represents the parameters for the "burn" function. `type BurnParams = WithOverrides<{ amount: AbiParameterToPrimitiveType<{ name: "amount"; type: "uint256"; }>; }>; ` ## BurnParams Represents the parameters for the "burn" function. `type BurnParams = WithOverrides<{ account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; id: AbiParameterToPrimitiveType<{ name: "id"; type: "uint256" }>; value: AbiParameterToPrimitiveType<{ name: "value"; type: "uint256"; }>; }>; ` ## BuyDirectListingButton This button is used with thirdweb Marketplace v3 contract, for buying NFT(s) from a listing. Under the hood, it prepares a transaction using the [buyFromListing extension](https://portal.thirdweb.com/references/typescript/v5/marketplace/buyFromListing)and then pass it to a `` Since it uses the TransactionButton, it can take in any props that can be passed to the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) ### Example `import { BuyDirectListingButton } from "thirdweb/react"; Buy NFT ` For error handling & callbacks on transaction-sent and transaction-confirmed, please refer to the TransactionButton docs. ##### Signature `function BuyDirectListingButton( props: [BuyDirectListingButtonProps](https://portal.thirdweb.com/references/typescript/v5/BuyDirectListingButtonProps), ): Element; ` ### Parameters ##### props #### Type `let props: Omit<[TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction"> & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; listingId: bigint; quantity?: bigint; }; ` ### Returns ##### Return Type `let returnType: Element; ` `` ## BuyFromListingParams `type BuyFromListingParams = { listingId: bigint; quantity: bigint; recipient: Address; }; ` ##### listingId `type listingId = bigint; ` ##### quantity `type quantity = bigint; ` ##### recipient `type recipient = Address; ` ## BuyDirectListingButtonProps `type BuyDirectListingButtonProps = Omit< [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction" > & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; listingId: bigint; quantity?: bigint; }; ` ## BuyHistoryData The result for [getBuyHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoHistory) function It includes both "Buy with Crypto" and "Buy with Fiat" transactions `type BuyHistoryData = { hasNextPage: boolean; page: Array< | { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus) } | { buyWithCryptoStatus: [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) } >; }; ` ##### hasNextPage Whether there are more pages of results. `type hasNextPage = boolean; ` ##### page The list of buy transactions. `type page = Array< | { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus) } | { buyWithCryptoStatus: [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) } >; ` ## BuyWithCryptoHistoryData The results for [getBuyWithCryptoHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoHistory) function It includes information about transactions that the wallet address has made through thirdweb buy with crypto. `type BuyWithCryptoHistoryData = { hasNextPage: boolean; page: Array<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)>; }; ` ##### hasNextPage `type hasNextPage = boolean; ` ##### page `type page = Array<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)>; ` ## BuyHistoryParams The parameters for [getBuyHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyHistory) function `type BuyHistoryParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### count The number of results to return. The default value is `10` . `type count = number; ` ##### start Index of the first result to return. The default value is `0` . `type start = number; ` ##### walletAddress The wallet address to get the buy history for. `type walletAddress = string; ` ## BuyWithCryptoHistoryParams The parameters for [getBuyWithCryptoHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoHistory) function It takes the wallet history address and optional cursor and page size. for paginated results. `type BuyWithCryptoHistoryParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### count The number of results to return in a single page. The default value is 10. `type count = number; ` ##### start The cursor for the page of results to return. The default value is `undefined` . `type start = number; ` ##### walletAddress The address of the wallet to get the wallet history for `type walletAddress = string; ` ## BuyWithCryptoQuote `type BuyWithCryptoQuote = { approvalData?: QuoteApprovalInfo; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); paymentTokens: Array; processingFees: Array; swapDetails: { estimated: { durationSeconds?: number; feesUSDCents: number; fromAmountUSDCents: number; gasCostUSDCents?: number; slippageBPS: number; toAmountMinUSDCents: number; toAmountUSDCents: number; }; fromAddress: string; fromAmount: string; fromAmountWei: string; fromToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); maxSlippageBPS: number; toAddress: string; toAmount: string; toAmountMin: string; toAmountMinWei: string; toAmountWei: string; toToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); }; transactionRequest: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); }; ` ##### approvalData `type approvalData = QuoteApprovalInfo; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### paymentTokens `type paymentTokens = Array; ` ##### processingFees `type processingFees = Array; ` ##### swapDetails `type swapDetails = { estimated: { durationSeconds?: number; feesUSDCents: number; fromAmountUSDCents: number; gasCostUSDCents?: number; slippageBPS: number; toAmountMinUSDCents: number; toAmountUSDCents: number; }; fromAddress: string; fromAmount: string; fromAmountWei: string; fromToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); maxSlippageBPS: number; toAddress: string; toAmount: string; toAmountMin: string; toAmountMinWei: string; toAmountWei: string; toToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); }; ` ##### transactionRequest `type transactionRequest = [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); ` ## BuyWithCryptoTransaction `type BuyWithCryptoTransaction = { chainId: number; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); transactionHash: string; }; ` ##### chainId `type chainId = number; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### transactionHash `type transactionHash = string; ` ## BuyWithCryptoTransfer `type BuyWithCryptoTransfer = { approvalData?: QuoteApprovalInfo; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); estimatedGasCostUSDCents: number; fromAddress: string; paymentToken: QuotePaymentToken; processingFee: QuotePaymentToken; toAddress: string; transactionRequest: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); }; ` ##### approvalData `type approvalData = QuoteApprovalInfo; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### estimatedGasCostUSDCents `type estimatedGasCostUSDCents = number; ` ##### fromAddress `type fromAddress = string; ` ##### paymentToken `type paymentToken = QuotePaymentToken; ` ##### processingFee `type processingFee = QuotePaymentToken; ` ##### toAddress `type toAddress = string; ` ##### transactionRequest `type transactionRequest = [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); ` ## BurnFromParams Represents the parameters for the "burnFrom" function. `type BurnFromParams = WithOverrides<{ account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; amount: AbiParameterToPrimitiveType<{ name: "amount"; type: "uint256"; }>; }>; ` ## BuyWithFiatQuote The response object returned by the [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function. This includes various information for buying a token using a fiat currency: * on-ramp provider UI link * The estimated time for the transaction to complete. * The on-ramp and destination token information. * Processing fees `type BuyWithFiatQuote = { estimatedDurationSeconds: number; estimatedToAmountMin: string; estimatedToAmountMinWei: string; fromAddress: string; fromCurrency: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; fromCurrencyWithFees: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; intentId: string; maxSlippageBPS: number; onRampLink: string; onRampToken: { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; processingFees: Array<{ amount: string; amountUnits: string; currencySymbol: string; decimals: number; feeType: "ON_RAMP" | "NETWORK"; }>; provider: FiatProvider; routingToken?: { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; toAddress: string; toAmountMin: string; toAmountMinWei: string; toToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; ` ##### estimatedDurationSeconds Estimated time for the transaction to complete in seconds. `type estimatedDurationSeconds = number; ` ##### estimatedToAmountMin Minimum amount of token that is expected to be received in units. `type estimatedToAmountMin = string; ` ##### estimatedToAmountMinWei Minimum amount of token that is expected to be received in wei. `type estimatedToAmountMinWei = string; ` ##### fromAddress Address of the wallet used for buying the token. `type fromAddress = string; ` ##### fromCurrency fiat currency used to buy the token - excluding the fees. `type fromCurrency = { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; ` ##### fromCurrencyWithFees Fiat currency used to buy the token - including the fees. `type fromCurrencyWithFees = { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; ` ##### intentId Id of transaction `type intentId = string; ` ##### maxSlippageBPS The maximum slippage in basis points (bps) allowed for the transaction. `type maxSlippageBPS = number; ` ##### onRampLink Link to the on-ramp provider UI that will prompt the user to buy the token with fiat currency. This link should be opened in a new tab. `type onRampLink = string; ` ### Example `window.open(quote.onRampLink, "_blank"); ` ##### onRampToken Token that will be sent to the user's wallet address by the on-ramp provider. If the token is same as `toToken` \- the user can directly buy the token from the on-ramp provider. If not, the user will receive this token and a swap is required to convert it `toToken` . `type onRampToken = { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; ` ##### processingFees Array of processing fees for the transaction. This includes the processing fees for on-ramp and swap (if required). `type processingFees = Array<{ amount: string; amountUnits: string; currencySymbol: string; decimals: number; feeType: "ON_RAMP" | "NETWORK"; }>; ` ##### provider The provider that was used to get the quote. `type provider = FiatProvider; ` ##### routingToken Routing token that will be swapped from the on-ramp token, so that it can be bridged to the destination token. `type routingToken = { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; ` ##### toAddress Address of the wallet to which the tokens will be sent. `type toAddress = string; ` ##### toAmountMin Amount of token that is expected to be received in wei. (estimatedToAmountMin - maxSlippageWei) `type toAmountMin = string; ` ##### toAmountMinWei Amount of token that is expected to be received in units. (estimatedToAmountMinWei - maxSlippageWei) `type toAmountMinWei = string; ` ##### toToken Token information for the desired token. (token the user wants to buy) `type toToken = [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); ` ## BuyWithCryptoStatus The object returned by the [getBuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoStatus) function to represent the status of a quoted transaction `type BuyWithCryptoStatus = | { status: "NOT_FOUND" } | { bridge?: string; destination?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); failureMessage?: string; fromAddress: string; purchaseData?: object; quote: BuyWithCryptoQuoteSummary; source?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); status: BuyWithCryptoStatuses; subStatus: BuyWithCryptoSubStatuses; swapType: SwapType; toAddress: string; }; ` ## BuyWithFiatHistoryData The results for [getBuyWithFiatHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatHistory) function `type BuyWithFiatHistoryData = { hasNextPage: boolean; page: Array<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; }; ` ##### hasNextPage `type hasNextPage = boolean; ` ##### page `type page = Array<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; ` ## BuyWithFiatStatus The returned object from [getBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatStatus) function If the in invalid intentId is provided, the object will have a status of "NOT\_FOUND" and no other fields. `type BuyWithFiatStatus = | { status: "NOT_FOUND" } | { destination?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); failureMessage?: string; fromAddress: string; intentId: string; purchaseData?: object; quote: { createdAt: string; estimatedDurationSeconds?: number; estimatedOnRampAmount: string; estimatedOnRampAmountWei: string; estimatedToTokenAmount: string; estimatedToTokenAmountWei: string; fromCurrency: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; fromCurrencyWithFees: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; onRampToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); toToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; source?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); status: | "NONE" | "PENDING_PAYMENT" | "PAYMENT_FAILED" | "PENDING_ON_RAMP_TRANSFER" | "ON_RAMP_TRANSFER_IN_PROGRESS" | "ON_RAMP_TRANSFER_COMPLETED" | "ON_RAMP_TRANSFER_FAILED" | "CRYPTO_SWAP_REQUIRED" | "CRYPTO_SWAP_COMPLETED" | "CRYPTO_SWAP_FALLBACK" | "CRYPTO_SWAP_IN_PROGRESS" | "CRYPTO_SWAP_FAILED"; toAddress: string; }; ` ## BuyerApprovedForListingEventFilters Represents the filters for the "BuyerApprovedForListing" event. `type BuyerApprovedForListingEventFilters = Partial<{ buyer: AbiParameterToPrimitiveType<{ indexed: true; name: "buyer"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## BytesToBigIntOpts `type BytesToBigIntOpts = { signed?: boolean; size?: number }; ` ##### signed Whether or not the number of a signed representation. `type signed = boolean; ` ##### size Size of the bytes. `type size = number; ` ## BuyWithFiatHistoryParams The parameters for [getBuyWithFiatHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatHistory) function `type BuyWithFiatHistoryParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### count The number of results to return in a single page. The default value is `10` . `type count = number; ` ##### start index of the first result to return. The default value is `0` . If you want to start the list from nth item, you can set the start value to (n-1). `type start = number; ` ##### walletAddress The address of the wallet to get the wallet history for `type walletAddress = string; ` ## BuyoutAuctionParams `type BuyoutAuctionParams = { auctionId: bigint }; ` ##### auctionId `type auctionId = bigint; ` ## CanClaimParams `type CanClaimParams = { claimer: string; from?: string } & ( | { quantityInWei: bigint } | { quantity: string } ); ` ## CanClaimParams `type CanClaimParams = { claimer: string; from?: string; quantity: bigint; tokenId: bigint; }; ` ##### claimer `type claimer = string; ` ##### from `type from = string; ` ##### quantity `type quantity = bigint; ` ##### tokenId `type tokenId = bigint; ` ## CanClaimParams `type CanClaimParams = { claimer: string; from?: string; quantity: bigint; }; ` ##### claimer `type claimer = string; ` ##### from `type from = string; ` ##### quantity `type quantity = bigint; ` ## CanClaimResult `type CanClaimResult = { reason?: string; result: boolean }; ` ##### reason `type reason = string; ` ##### result `type result = boolean; ` ## CancelAuctionParams `type CancelAuctionParams = { auctionId: bigint }; ` ##### auctionId `type auctionId = bigint; ` ## BalanceOfParams Represents the parameters for the "balanceOf" function. `type BalanceOfParams = { address: AbiParameterToPrimitiveType<{ name: "_address"; type: "address"; }>; }; ` ##### address `type address = AbiParameterToPrimitiveType<{ name: "_address"; type: "address"; }>; ` ## CanClaimResult `type CanClaimResult = { reason?: string; result: boolean }; ` ##### reason `type reason = string; ` ##### result `type result = boolean; ` ## CancelOfferParams Represents the parameters for the "cancelOffer" function. `type CancelOfferParams = WithOverrides<{ offerId: AbiParameterToPrimitiveType<{ name: "_offerId"; type: "uint256"; }>; }>; ` ## CancelledListingEventFilters Represents the filters for the "CancelledListing" event. `type CancelledListingEventFilters = Partial<{ listingCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "listingCreator"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## CancelListingParams Represents the parameters for the "cancelListing" function. `type CancelListingParams = WithOverrides<{ listingId: AbiParameterToPrimitiveType<{ name: "_listingId"; type: "uint256"; }>; }>; ` ## CancelledOfferEventFilters Represents the filters for the "CancelledOffer" event. `type CancelledOfferEventFilters = Partial<{ offerId: AbiParameterToPrimitiveType<{ indexed: true; name: "offerId"; type: "uint256"; }>; offeror: AbiParameterToPrimitiveType<{ indexed: true; name: "offeror"; type: "address"; }>; }>; ` ## CastVoteBySigParams Represents the parameters for the "castVoteBySig" function. `type CastVoteBySigParams = WithOverrides<{ proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; r: AbiParameterToPrimitiveType<{ name: "r"; type: "bytes32" }>; s: AbiParameterToPrimitiveType<{ name: "s"; type: "bytes32" }>; support: AbiParameterToPrimitiveType<{ name: "support"; type: "uint8"; }>; v: AbiParameterToPrimitiveType<{ name: "v"; type: "uint8" }>; }>; ` ## CastVoteParams Represents the parameters for the "castVote" function. `type CastVoteParams = WithOverrides<{ proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; support: AbiParameterToPrimitiveType<{ name: "support"; type: "uint8"; }>; }>; ` ## CastVoteWithReasonAndParamsParams Represents the parameters for the "castVoteWithReasonAndParams" function. `type CastVoteWithReasonAndParamsParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ name: "params"; type: "bytes"; }>; proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; reason: AbiParameterToPrimitiveType<{ name: "reason"; type: "string"; }>; support: AbiParameterToPrimitiveType<{ name: "support"; type: "uint8"; }>; }>; ` ## CancelledAuctionEventFilters Represents the filters for the "CancelledAuction" event. `type CancelledAuctionEventFilters = Partial<{ auctionCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionCreator"; type: "address"; }>; auctionId: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionId"; type: "uint256"; }>; }>; ` ## CastVoteWithReasonAndParamsBySigParams Represents the parameters for the "castVoteWithReasonAndParamsBySig" function. `type CastVoteWithReasonAndParamsBySigParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ name: "params"; type: "bytes"; }>; proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; r: AbiParameterToPrimitiveType<{ name: "r"; type: "bytes32" }>; reason: AbiParameterToPrimitiveType<{ name: "reason"; type: "string"; }>; s: AbiParameterToPrimitiveType<{ name: "s"; type: "bytes32" }>; support: AbiParameterToPrimitiveType<{ name: "support"; type: "uint8"; }>; v: AbiParameterToPrimitiveType<{ name: "v"; type: "uint8" }>; }>; ` ## ChainMetadata `type ChainMetadata = { chain: string; chainId: number; ens?: { registry: string }; explorers?: Readonly>; faucets?: readonly Array; features?: Readonly>; icon?: Icon; infoURL?: string; name: string; nativeCurrency: { decimals: number; name: string; symbol: string }; networkId?: number; parent?: { bridges?: Readonly>; chain: string; type: string }; redFlags?: readonly Array; rpc: readonly Array; shortName: string; slip44?: number; slug: string; stackType: string; status?: string; testnet: boolean; title?: string } ` ##### chain `type chain = string; ` ##### chainId `type chainId = number; ` ##### ens `type ens = { registry: string }; ` ##### explorers `type explorers = Readonly>; ` ##### faucets `type faucets = readonly Array ` ##### features `type features = Readonly>; ` ##### icon `type icon = Icon; ` ##### infoURL `type infoURL = string; ` ##### name `type name = string; ` ##### nativeCurrency `type nativeCurrency = { decimals: number; name: string; symbol: string; }; ` ##### networkId `type networkId = number; ` ##### parent `type parent = { bridges?: Readonly>; chain: string; type: string; }; ` ##### redFlags `type redFlags = readonly Array ` ##### rpc `type rpc = readonly Array ` ##### shortName `type shortName = string; ` ##### slip44 `type slip44 = number; ` ##### slug `type slug = string; ` ##### stackType `type stackType = string; ` ##### status `type status = string; ` ##### testnet `type testnet = boolean; ` ##### title `type title = string; ` ## ChainOptions `type ChainOptions = { blockExplorers?: Array<{ apiUrl?: string; name: string; url: string; }>; experimental?: { increaseZeroByteCount?: boolean }; faucets?: Array; feeType?: FeeType; icon?: Icon; id: number; name?: string; nativeCurrency?: { decimals?: number; name?: string; symbol?: string; }; rpc?: string; testnet?: true; }; ` ##### blockExplorers `type blockExplorers = Array<{ apiUrl?: string; name: string; url: string; }>; ` ##### experimental `type experimental = { increaseZeroByteCount?: boolean }; ` ##### faucets `type faucets = Array; ` ##### feeType `type feeType = FeeType; ` ##### icon `type icon = Icon; ` ##### id `type id = number; ` ##### name `type name = string; ` ##### nativeCurrency `type nativeCurrency = { decimals?: number; name?: string; symbol?: string; }; ` ##### rpc `type rpc = string; ` ##### testnet `type testnet = true; ` ## ChainProvider A React context provider component that supplies Chain-related data to its child components. This component serves as a wrapper around the `ChainProviderContext.Provider` and passes the provided chain data down to all of its child components through the context API. ### Example #### Basic usage `import { ChainProvider, ChainIcon, ChainName } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ; ` #### Usage with defineChain `import { defineChain } from "thirdweb/chains"l import { ChainProvider, ChainName } from "thirdweb/react"; const chainId = someNumber; ` ##### Signature `function ChainProvider( props: PropsWithChildren<[ChainProviderProps](https://portal.thirdweb.com/references/typescript/v5/ChainProviderProps)>, ): Element; ` ### Parameters ##### props #### Type `let props: PropsWithChildren<[ChainProviderProps](https://portal.thirdweb.com/references/typescript/v5/ChainProviderProps)>; ` ### Returns ##### Return Type `let returnType: Element; ` ## ChainProviderProps Props for the `` component `type ChainProviderProps = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ChangeRecoveryAddressParams Represents the parameters for the "changeRecoveryAddress" function. `type ChangeRecoveryAddressParams = WithOverrides<{ recovery: AbiParameterToPrimitiveType<{ name: "recovery"; type: "address"; }>; }>; ` ## CastVoteWithReasonParams Represents the parameters for the "castVoteWithReason" function. `type CastVoteWithReasonParams = WithOverrides<{ proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; reason: AbiParameterToPrimitiveType<{ name: "reason"; type: "string"; }>; support: AbiParameterToPrimitiveType<{ name: "support"; type: "uint8"; }>; }>; ` ## ClaimButton This button is used to claim tokens (NFT or ERC20) from a given thirdweb Drop contract. there are 3 type of Drop contract: NFT Drop (DropERC721), Edition Drop (DropERC1155) and Token Drop (DropERC20) Learn more: https://thirdweb.com/explore/drops Note: This button only works with thirdweb Drop contracts. For custom contract, please use [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) ### Example Example for claiming NFT from an NFT Drop contract `import { ClaimButton } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; Claim now ; ` For Edition Drop (ERC1155) ` Claim now ; ` For Token Drop (ERC20) `` Claim now ; `` Attach custom Pay metadata ` ... ; ` Since this button uses the `TransactionButton` , it can take in any props that can be passed to the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) For error handling & callbacks on transaction-sent and transaction-confirmed, please refer to the TransactionButton docs. ##### Signature `function ClaimButton(props: [ClaimButtonProps](https://portal.thirdweb.com/references/typescript/v5/ClaimButtonProps)): Element; ` ### Parameters ##### props #### Type `let props: Omit<[TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction"> & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); claimParams: ClaimParams; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; }; ` ### Returns ##### Return Type `let returnType: Element; ` A wrapper for TransactionButton ## CheckContractWalletSignatureOptions `type CheckContractWalletSignatureOptions = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); message: SignableMessage; signature: string; }; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### message `type message = SignableMessage; ` ##### signature `type signature = string; ` ## ClaimButtonProps Props for the ClaimButton component `type ClaimButtonProps = Omit< [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction" > & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); claimParams: ClaimParams; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; }; ` ## ClaimERC1155Params `type ClaimERC1155Params = { recipient: string; tokenAddress: string }; ` ##### recipient `type recipient = string; ` ##### tokenAddress `type tokenAddress = string; ` ## ClaimERC20Params `type ClaimERC20Params = { recipient: string; tokenAddress: string }; ` ##### recipient `type recipient = string; ` ##### tokenAddress `type tokenAddress = string; ` ## ClaimERC721Params `type ClaimERC721Params = { recipient: string; tokenAddress: string }; ` ##### recipient `type recipient = string; ` ##### tokenAddress `type tokenAddress = string; ` ## ClaimToBatchParams `type ClaimToBatchParams = WithOverrides<{ content: Array<{ quantity: bigint; to: Address }>; from?: Address; }>; ` ## ClaimToParams Represents the parameters for claiming an ERC20 token. `type ClaimToParams = { from?: Address; singlePhaseDrop?: boolean; to: Address; } & ({ quantityInWei: bigint } | { quantity: string }); ` ## ClaimToParams `type ClaimToParams = { from?: string; quantity: bigint; singlePhaseDrop?: boolean; to: string; tokenId: bigint; }; ` ##### from `type from = string; ` ##### quantity `type quantity = bigint; ` ##### singlePhaseDrop `type singlePhaseDrop = boolean; ` ##### to `type to = string; ` ##### tokenId `type tokenId = bigint; ` ## CoinbaseSDKWalletConnectionOptions Options for connecting to the CoinbaseSDK Wallet `type CoinbaseSDKWalletConnectionOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### chain If you want the wallet to be connected to a specific blockchain, you can pass a `Chain` object to the `connect` method. This will trigger a chain switch if the wallet provider is not already connected to the specified chain. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain. `import { defineChain } from "thirdweb"; const myChain = defineChain(myChainId); const address = await wallet.connect({ chain: myChain }); ` `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client The Thirdweb client object `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## ClaimToParams Represents the parameters for claiming an ERC721 token. `type ClaimToParams = { from?: Address; quantity: bigint; singlePhaseDrop?: boolean; to: Address; }; ` ##### from `type from = Address; ` ##### quantity `type quantity = bigint; ` ##### singlePhaseDrop `type singlePhaseDrop = boolean; ` ##### to `type to = Address; ` ## CheckContractWalletSignTypedDataOptions `type CheckContractWalletSignTypedDataOptions< typedData extends ox__TypedData.TypedData | Record, primaryType extends | keyof typedData | "EIP712Domain" = keyof typedData, > = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); data: ox__TypedData.Definition; signature: string; }; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### data `type data = ox__TypedData.Definition; ` ##### signature `type signature = string; ` ## CoinbaseWalletCreationOptions `type CoinbaseWalletCreationOptions = | { appMetadata?: AppMetadata; chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; mobileConfig?: { callbackURL?: string }; walletConfig?: Preference; } | undefined; ` ## CollectAuctionTokensParams Represents the parameters for the "collectAuctionTokens" function. `type CollectAuctionTokensParams = WithOverrides<{ auctionId: AbiParameterToPrimitiveType<{ name: "_auctionId"; type: "uint256"; }>; }>; ` ## CompleteOwnershipHandoverParams Represents the parameters for the "completeOwnershipHandover" function. `type CompleteOwnershipHandoverParams = WithOverrides<{ pendingOwner: AbiParameterToPrimitiveType<{ name: "pendingOwner"; type: "address"; }>; }>; ` ## CanClaimResult `type CanClaimResult = { reason?: string; result: boolean }; ` ##### reason `type reason = string; ` ##### result `type result = boolean; ` ## ConnectButton\_connectButtonOptions Options for configuring the `ConnectButton` 's Connect Button `type ConnectButton_connectButtonOptions = { className?: string; label?: React.ReactNode; style?: React.CSSProperties; }; ` ##### className CSS class to apply to the button element For some CSS properties, you may need to use the `!important` to override the default styles `; ` `type className = string; ` ##### label Set a custom label for the button. The default is `"Connect"` `type label = React.ReactNode; ` ### Example `; ` ##### style CSS styles to apply to the connectButton element `type style = React.CSSProperties; ` ### Example `; ` ## ConnectButton\_connectModalOptions Options for configuring the `ConnectButton` 's Connect Modal `type ConnectButton_connectModalOptions = { privacyPolicyUrl?: string; requireApproval?: boolean; showThirdwebBranding?: boolean; size?: "compact" | "wide"; termsOfServiceUrl?: string; title?: string; titleIcon?: string; welcomeScreen?: [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); }; ` ##### privacyPolicyUrl URL of the "privacy policy" page If provided, Modal will show a Privacy Policy message at the bottom with below link `type privacyPolicyUrl = string; ` ### Example ` ` ##### requireApproval Require terms of service and privacy policy to be accepted before connecting an in-app wallet. By default it's `false` `type requireApproval = boolean; ` ### Example `; ` ##### showThirdwebBranding By default `ConnectButton` 's Modal shows "Powered by Thirdweb" branding at the bottom of the Modal. If you want to hide the branding, set this prop to `false` `type showThirdwebBranding = boolean; ` ### Example `; ` ##### size Set the size of the connect modal on desktop - `"compact"` or `"wide"` Modal size is always `compact` on mobile By default it is `"wide"` for desktop. `type size = "compact" | "wide"; ` ##### termsOfServiceUrl URL of the "terms of service" page If provided, Modal will show a Terms of Service message at the bottom with below link `type termsOfServiceUrl = string; ` ### Example `; ` ##### title Title to show in `ConnectButton` 's Modal The default is `"Connect"` `type title = string; ` ##### titleIcon Replace the default thirdweb icon next to Modal title with your own icon Set to empty string (`""` ) to hide the icon `type titleIcon = string; ` ### Example `; ` ##### welcomeScreen Customize the welcome screen. This prop is only applicable when modalSize prop is set to "wide". On "wide" Modal size, a welcome screen is shown on the right side of the modal. This screen can be customized in two ways ##### 1\. Customize Metadata and Image `const welcomeScreen = { title: "your title", subtitle: "your subtitle", img: { src: "https://your-image-url.png", width: 300, height: 50, }, } ` ##### 2\. Render Custom Component ` , }} />; ` `type welcomeScreen = [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); ` ## ConnectButton\_detailsModalOptions Options for configuring the `ConnectButton` 's Details Modal `type ConnectButton_detailsModalOptions = { assetTabs?: Array; connectedAccountAvatarUrl?: string; connectedAccountName?: React.ReactNode; footer?: (props: { close: () => void }) => JSX.Element; hiddenWallets?: Array<[WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)>; hideBuyFunds?: boolean; hideDisconnect?: boolean; hideReceiveFunds?: boolean; hideSendFunds?: boolean; hideSwitchWallet?: boolean; manageWallet?: { allowLinkingProfiles?: boolean }; networkSelector?: [NetworkSelectorProps](https://portal.thirdweb.com/references/typescript/v5/NetworkSelectorProps); onClose?: (screen: string) => void; payOptions?: Extract<[PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions), { mode?: "fund_wallet" }>; showBalanceInFiat?: SupportedFiatCurrency; showTestnetFaucet?: boolean; }; ` ##### assetTabs When you click on "View Assets", by default the "Tokens" tab is shown first. If you want to show the "NFTs" tab first, change the order of the asset tabs to: \["nft", "token"\] Note: If an empty array is passed, the \[View Funds\] button will be hidden `type assetTabs = Array; ` ##### connectedAccountAvatarUrl Use custom avatar URL for the connected wallet image in the `ConnectButton` Details Modal, overriding ENS avatar or Blobbie icon. `type connectedAccountAvatarUrl = string; ` ##### connectedAccountName Render custom UI for the connected wallet name in the `ConnectButton` Details Modal, overriding ENS name or wallet address. `type connectedAccountName = React.ReactNode; ` ##### footer ##### Signature `function footer(props: { close: () => void }): JSX.Element; ` ##### Parameters ##### props props passed to the footer component which includes a function to close the modal ###### Type `let props: { close: () => void }; ` ##### Returns ##### Return Type `let returnType: JSX.Element; ` ##### hiddenWallets All wallet IDs included in this array will be hidden from wallet selection when connected. `type hiddenWallets = Array<[WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)>; ` ##### hideBuyFunds Hide the "Buy Funds" button in the `ConnectButton` Details Modal. By default the "Buy Funds" button is shown. `type hideBuyFunds = boolean; ` ##### hideDisconnect Hide the "Disconnect Wallet" button in the `ConnectButton` Details Modal. By default it is `false` `type hideDisconnect = boolean; ` ### Example `; ` ##### hideReceiveFunds Hide the "Receive Funds" button in the `ConnectButton` Details Modal. By default the "Receive Funds" button is shown. `type hideReceiveFunds = boolean; ` ##### hideSendFunds Hide the "Send Funds" button in the `ConnectButton` Details Modal. By default the "Send Funds" button is shown. `type hideSendFunds = boolean; ` ##### hideSwitchWallet Hide the "Switch Wallet" button in the `ConnectButton` Details Modal. By default it is `false` `type hideSwitchWallet = boolean; ` ### Example `; ` ##### manageWallet Configure options for managing the connected wallet. `type manageWallet = { allowLinkingProfiles?: boolean }; ` ##### networkSelector customize the Network selector shown in the `ConnectButton` Details Modal `type networkSelector = [NetworkSelectorProps](https://portal.thirdweb.com/references/typescript/v5/NetworkSelectorProps); ` ##### onClose ##### Signature `function onClose(screen: string): void; ` ##### Parameters ##### screen The screen's name that was last shown when user closed the modal ###### Type `let screen: string; ` ##### Returns ##### Return Type `let returnType: void; ` ##### payOptions Configure options for thirdweb Pay. thirdweb Pay allows users to buy tokens using crypto or fiat currency. `type payOptions = Extract<[PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions), { mode?: "fund_wallet" }>; ` ##### showBalanceInFiat Show the token balance's value in fiat. Note: Not all tokens are resolvable to a fiat value. In that case, nothing will be shown. `type showBalanceInFiat = SupportedFiatCurrency; ` ##### showTestnetFaucet Show a "Request Testnet funds" link in `ConnectButton` Details Modal when user is connected to a testnet. By default it is `false` , If you want to show the "Request Testnet funds" link when user is connected to a testnet, set this prop to `true` . Keep in mind that the link will only be shown if there are faucet links registered with the chain. `type showTestnetFaucet = boolean; ` ### Example `; ` ## ConnectButton A fully featured wallet connection component that allows to: * Connect to 500+ external wallets * Connect with email, phone, passkey or socials * Convert any wallet to a ERC4337 smart wallet for gasless transactions * Sign in with ethereum (Auth) Once connected, the component allows to: * Reolve ENS names and avatars * Manage multipple connected wallets * Send and receive native tokens and ERC20 tokens * View ERC20 tokens and NFTs * Onramp, bridge and swap tokens * Switch chains * Connect to another app with WalletConnect ### Example ### Default setup `import { createThirdwebClient } from "thirdweb"; import { ConnectButton } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" }); ; ` [ View all available config options](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps) ### Customization options #### Customizing wallet options `; ` [ View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets) #### Customizing the default chain to connect to `import { sepolia } from "thirdweb/chains"; ; ` #### Enabling Account Abstraction By passing the `accountAbstraction` prop, ALL connected wallets will be converted to smart accounts. And by setting `sponsorGas` to `true` , all transactions done with those smart accounts will be sponsored. `; ` Note that this prop doesn't affect ecosystem wallets. Ecosystem wallets will only be converted to smart accounts if the ecosystem owner has enabled account abstraction. #### Enabling sign in with ethereum (Auth) ` { console.log("checking if logged in!", { address }); return await isLoggedIn(); }, doLogin: async (params) => { console.log("logging in!"); await login(params); }, getLoginPayload: async ({ address }) => generatePayload({ address }), doLogout: async () => { console.log("logging out!"); await logout(); }, }} />; ` #### Customizing the theme `; ` For more granular control, you can also pass a custom theme object: `; ` [ View all available themes properties](https://portal.thirdweb.com/references/typescript/v5/Theme) #### Changing the display language `; ` [ View all available locales](https://portal.thirdweb.com/references/typescript/v5/LocaleId) #### Customizing the connect button UI `; ` #### Customizing the modal UI `; ` #### Customizing details button UI (after connecting) `; ` [ View all available auth helper functions](https://portal.thirdweb.com/references/typescript/v5/createAuth) #### Customizing the Auth sign in button (after connecting, but before authenticating) `; ` #### Customizing supported Tokens and NFTs These tokens and NFTs will be shown in the modal when the user clicks "View Assets", as well as the send token screen. `; ` #### Customizing the orders of the tabs in the \[View Funds\] screen When you click on "View Assets", by default the "Tokens" tab is shown first. If you want to show the "NFTs" tab first, change the order of the asset tabs to: \["nft", "token"\] Note: If an empty array is passed, the \[View Funds\] button will be hidden `; ` #### Callback for when the details modal is closed ` { console.log({ screen }); }, }} />; ` ##### Signature `function ConnectButton(props: [ConnectButtonProps](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps)): Element; ` ### Parameters ##### props Props for the `ConnectButton` component Refer to [ ConnectButtonProps](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps) to see the available props. #### Type `let props: { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); autoConnect?: { timeout: number } | boolean; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectButton?: [ConnectButton_connectButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectButtonOptions); connectModal?: [ConnectButton_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions); detailsButton?: [ConnectButton_detailsButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsButtonOptions); detailsModal?: [ConnectButton_detailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsModalOptions); locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; onDisconnect?: (info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) }) => void; recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; showAllWallets?: boolean; signInButton?: { className?: string; label?: string; style?: React.CSSProperties; }; supportedNFTs?: SupportedNFTs; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); switchButton?: { className?: string; label?: string; style?: React.CSSProperties; }; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ### Returns ##### Return Type `let returnType: Element; ` A JSX element that renders the `` component. ## ConnectEmbed An inline wallet connection component that allows to: * Connect to 500+ external wallets * Connect with email, phone, passkey or socials * Convert any wallet to a ERC4337 smart wallet for gasless transactions * Sign in with ethereum (Auth) It renders the same UI as the [ConnectButton](https://portal.thirdweb.com/react/v5/ConnectButton) component's modal - but directly inline in the page instead of being in a modal. Once connected, the component does not render any UI. It only renders UI if wallet is not connected. ### Example ### Default setup `import { createThirdwebClient } from "thirdweb"; import { ConnectEmbed } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" }); ; ` [ View all available config options](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps) ### Customization options #### Customizing wallet options `; ` [ View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets) #### Customizing the default chain to connect to `import { base } from "thirdweb/chains"; ; ` #### Enabling Account Abstraction By passing the `accountAbstraction` prop, ALL connected wallets will be converted to smart accounts. And by setting `sponsorGas` to `true` , all transactions done with those smart accounts will be sponsored. `; ` Note that this prop doesn't affect ecosystem wallets. Ecosystem wallets will only be converted to smart accounts if the ecosystem owner has enabled account abstraction. #### Enabling sign in with ethereum (Auth) ` { console.log("checking if logged in!", { address }); return await isLoggedIn(); }, doLogin: async (params) => { console.log("logging in!"); await login(params); }, getLoginPayload: async ({ address }) => generatePayload({ address }), doLogout: async () => { console.log("logging out!"); await logout(); }, }} />; ` #### Customizing the theme `; ` For more granular control, you can also pass a custom theme object: `; ` [ View all available themes properties](https://portal.thirdweb.com/references/typescript/v5/Theme) #### Changing the display language `; ` [ View all available locales](https://portal.thirdweb.com/references/typescript/v5/LocaleId) ##### Signature `function ConnectEmbed(props: [ConnectEmbedProps](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps)): Element; ` ### Parameters ##### props The props for the `ConnectEmbed` component. Refer to the [ConnectEmbedProps](https://portal.thirdweb.com/references/typescript/v5/ConnectEmbedProps) type for more details #### Type `let props: { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); autoConnect?: { timeout: number } | boolean; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; className?: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); header?: { title?: string; titleIcon?: string } | true; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); modalSize?: "compact" | "wide"; onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; privacyPolicyUrl?: string; recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; requireApproval?: boolean; showAllWallets?: boolean; showThirdwebBranding?: boolean; style?: React.CSSProperties; termsOfServiceUrl?: string; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; welcomeScreen?: [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); }; ` ### Returns ##### Return Type `let returnType: Element; ` A JSX element that renders the `` component. ## ConnectButton\_detailsButtonOptions Options for configuring the `ConnectButton` 's Details Button `type ConnectButton_detailsButtonOptions = { className?: string; connectedAccountAvatarUrl?: string; connectedAccountName?: React.ReactNode; displayBalanceToken?: Record; render?: () => JSX.Element; showBalanceInFiat?: SupportedFiatCurrency; style?: React.CSSProperties; }; ` ##### className CSS class to apply to the details button element `type className = string; ` ##### connectedAccountAvatarUrl Use custom avatar URL for the connected wallet image in the `ConnectButton` details button, overriding ENS avatar or Blobbie icon. `type connectedAccountAvatarUrl = string; ` ##### connectedAccountName Render custom UI for the connected wallet name in the `ConnectButton` details button, overriding ENS name or wallet address. `type connectedAccountName = React.ReactNode; ` ##### displayBalanceToken Display the balance of a token instead of the native token in `ConnectButton` details button. `type displayBalanceToken = Record; ` ### Example ` ` ##### render ##### Signature `function render(): JSX.Element; ` ##### Returns ##### Return Type `let returnType: JSX.Element; ` ##### showBalanceInFiat Show the token balance's value in fiat. Note: Not all tokens are resolvable to a fiat value. In that case, nothing will be shown. `type showBalanceInFiat = SupportedFiatCurrency; ` ##### style CSS styles to apply to the details button element `type style = React.CSSProperties; ` ## CollectAuctionPayoutParams Represents the parameters for the "collectAuctionPayout" function. `type CollectAuctionPayoutParams = WithOverrides<{ auctionId: AbiParameterToPrimitiveType<{ name: "_auctionId"; type: "uint256"; }>; }>; ` ## ConnectEmbedProps `type ConnectEmbedProps = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); autoConnect?: { timeout: number } | boolean; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; className?: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); header?: { title?: string; titleIcon?: string } | true; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); modalSize?: "compact" | "wide"; onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; privacyPolicyUrl?: string; recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; requireApproval?: boolean; showAllWallets?: boolean; showThirdwebBranding?: boolean; style?: React.CSSProperties; termsOfServiceUrl?: string; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; welcomeScreen?: [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); }; ` ##### accountAbstraction Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options. This allows to sponsor gas fees for your user's transaction using the thirdweb account abstraction infrastructure. ` ` `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### appMetadata Metadata of the app that will be passed to connected wallet. Setting this is highly recommended. Some wallets display this information to the user when they connect to your app. `type appMetadata = AppMetadata; ` ### Example `{ name: "My App", url: "https://my-app.com", description: "some description about your app", logoUrl: "https://path/to/my-app/logo.svg", }; ` ##### auth Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to enforce the users to sign a message after connecting their wallet to authenticate themselves. Refer to the [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details `type auth = [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); ` ##### autoConnect When the user has connected their wallet to your site, this configuration determines whether or not you want to automatically connect to the last connected wallet when user visits your site again in the future. By default it is set to `{ timeout: 15000 }` meaning that autoConnect is enabled and if the autoConnection does not succeed within 15 seconds, it will be cancelled. If you want to disable autoConnect, set this prop to `false` . If you want to customize the timeout, you can assign an object with a `timeout` key to this prop. `; ` `type autoConnect = { timeout: number } | boolean; ` ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet. If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it. This ensures that the wallet is connected to the correct blockchain before interacting with your app. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ### Example `import { polygon } from "thirdweb/chains"; function Example() { return (
{" "} {" "}
); } ` ##### chains Array of chains that your app supports. This is only relevant if your app is a multi-chain app and works across multiple blockchains. If your app only works on a single blockchain, you should only specify the `chain` prop. Given list of chains will used in various ways: * They will be displayed in the network selector in the `ConnectEmbed` 's details modal post connection * They will be sent to wallet at the time of connection if the wallet supports requesting multiple chains ( example: WalletConnect ) so that users can switch between the chains post connection easily `; ` You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `import { defineChain } from "thirdweb/react"; const polygon = defineChain({ id: 137, }); ` `type chains = Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; ` ##### className Class name to be added to the root element of ConnectEmbed `type className = string; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### header Set custom title and icon to show for the embed Set it to `true` to show the default title and icon `type header = { title?: string; titleIcon?: string } | true; ` ##### locale By default - ConnectEmbed UI uses the `en-US` locale for english language users. You can customize the language used in the ConnectEmbed UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### modalSize ConnectEmbed supports two modal size variants: `compact` and `wide` . By default it is set to `compact` , you can set it to `wide` if you want to show a wider modal. Note that if the screen width can not fit the wide modal, the `compact` version will be shown regardless of this `modalSize` options provided `type modalSize = "compact" | "wide"; ` ##### onConnect ##### Signature `function onConnect(wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)): void; ` ##### Parameters ##### wallet ###### Type `let wallet: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### privacyPolicyUrl If provided, Embed will show a Privacy Policy message at the bottom with below link `type privacyPolicyUrl = string; ` ##### recommendedWallets Wallets to show as recommended in the `ConnectEmbed` UI `type recommendedWallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ##### requireApproval If provided, users will be required to accept the Terms of Service before connecting an in-app wallet. `type requireApproval = boolean; ` ##### showAllWallets By default, `ConnectEmbed` shows a "All Wallets" button that shows a list of 500+ wallets. You can disable this button by setting `showAllWallets` prop to `false` `type showAllWallets = boolean; ` ##### showThirdwebBranding By default, A "Powered by Thirdweb" branding is shown at the bottom of the embed. If you want to hide it, set this to `false` `type showThirdwebBranding = boolean; ` ### Example `; ` ##### style CSS styles to be applied to the root element of ConnectEmbed `type style = React.CSSProperties; ` ##### termsOfServiceUrl If provided, Embed will show a Terms of Service message at the bottom with below link `type termsOfServiceUrl = string; ` ##### theme Set the theme for the `ConnectEmbed` component. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); function Example() { return ; } ` ##### walletConnect Configure options for WalletConnect By default WalletConnect uses the thirdweb's default project id. Setting your own project id is recommended. You can create a project id by signing up on [ walletconnect.com](https://walletconnect.com/) `type walletConnect = { projectId?: string }; ` ##### wallets Array of supported wallets. If not provided, default wallets will be used. `type wallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ### Example `import { AutoConnect } from "thirdweb/react"; import { createWallet, inAppWallet } from "thirdweb/wallets"; const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), ]; function Example() { return ; } ` If no wallets are specified. The component will show All the EIP-6963 compliant installed wallet extensions, as well as below default wallets: `const defaultWallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), createWallet("io.zerion.wallet"), ]; ` The `ConnectEmbed` also shows a "All wallets" button at the end of wallet list which allows user to connect to any of the 500+ wallets ##### welcomeScreen Customize the welcome screen. This prop is only applicable when modalSize prop is set to "wide". On "wide" Modal size, a welcome screen is shown on the right side of the modal. This screen can be customized in two ways ##### 1\. Customize Metadata and Image `const welcomeScreen = { title: "your title", subtitle: "your subtitle", img: { src: "https://your-image-url.png", width: 300, height: 50, }, } ` ##### 2\. Render Custom Component ` } />; ` `type welcomeScreen = [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); ` ## ContractOptions `type ContractOptions< abi extends Abi = [], address extends string = string, > = { readonly abi?: abi; address: address; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### abi `type abi = abi; ` ##### address `type address = address; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## ConvertFiatToCryptoParams Props for the `convertFiatToCrypto` function `type ConvertFiatToCryptoParams = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); from: SupportedFiatCurrency; fromAmount: number; to: Address; }; ` ##### chain The chain that the token is deployed to `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### from The fiat symbol. e.g: "USD" Currently only USD is supported. `type from = SupportedFiatCurrency; ` ##### fromAmount The total amount of fiat to convert e.g: If you want to convert 2 cents to USD, enter `0.02` `type fromAmount = number; ` ##### to The token address For native token, use NATIVE\_TOKEN\_ADDRESS `type to = Address; ` ## ConvertToAssetsParams Represents the parameters for the "convertToAssets" function. `type ConvertToAssetsParams = { shares: AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; }; ` ##### shares `type shares = AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; ` ## ConnectManagerOptions `type ConnectManagerOptions = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; setWalletAsActive?: boolean; }; ` ##### accountAbstraction `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### onConnect ##### Signature `function onConnect(wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)): void; ` ##### Parameters ##### wallet ###### Type `let wallet: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### setWalletAsActive `type setWalletAsActive = boolean; ` ## ConvertCryptoToFiatParams Props for the `convertCryptoToFiat` function `type ConvertCryptoToFiatParams = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAmount: number; fromTokenAddress: Address; to: SupportedFiatCurrency; }; ` ##### chain The chain that the token is deployed to `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### fromAmount The amount of token to convert to fiat value `type fromAmount = number; ` ##### fromTokenAddress The contract address of the token For native token, use NATIVE\_TOKEN\_ADDRESS `type fromTokenAddress = Address; ` ##### to The fiat symbol. e.g "USD" Only USD is supported at the moment. `type to = SupportedFiatCurrency; ` ## ConvertToSharesParams Represents the parameters for the "convertToShares" function. `type ConvertToSharesParams = { assets: AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; }; ` ##### assets `type assets = AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; ` ## CreateAccountParams Represents the parameters for the "createAccount" function. `type CreateAccountParams = WithOverrides<{ admin: AbiParameterToPrimitiveType<{ name: "admin"; type: "address"; }>; data: AbiParameterToPrimitiveType<{ name: "_data"; type: "bytes" }>; }>; ` ## CreateAuctionParams `type CreateAuctionParams = { assetContractAddress: Address; bidBufferBps?: number; currencyContractAddress?: Address; endTimestamp?: Date; quantity?: bigint; startTimestamp?: Date; timeBufferInSeconds?: number; tokenId: bigint; } & MinimumBidAmount & BuyoutBidAmount; ` ## CreateDelayedRevealBatchParams `type CreateDelayedRevealBatchParams = { metadata: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput)>; password: string; placeholderMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); }; ` ##### metadata `type metadata = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput)>; ` ##### password `type password = string; ` ##### placeholderMetadata `type placeholderMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ## CountParams Represents the parameters for the "count" function. `type CountParams = { deployer: AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; }; ` ##### deployer `type deployer = AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; ` ## CreateListingParams `type CreateListingParams = { assetContractAddress: Address; currencyContractAddress?: Address; endTimestamp?: Date; isReservedListing?: boolean; quantity?: bigint; startTimestamp?: Date; tokenId: bigint; } & ({ pricePerToken: string } | { pricePerTokenWei: string }); ` ## CreateDirectListingButtonProps `type CreateDirectListingButtonProps = Omit< [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction" > & [CreateListingParams](https://portal.thirdweb.com/references/typescript/v5/CreateListingParams) & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; }; ` ## CreateNewPackParams `type CreateNewPackParams = { amountDistributedPerOpen: bigint; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); erc1155Rewards?: Array<[ERC1155Reward](https://portal.thirdweb.com/references/typescript/v5/ERC1155Reward)>; erc20Rewards?: Array<[ERC20Reward](https://portal.thirdweb.com/references/typescript/v5/ERC20Reward)>; erc721Rewards?: Array<[ERC721Reward](https://portal.thirdweb.com/references/typescript/v5/ERC721Reward)>; openStartTimestamp: Date; packMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; recipient: string; tokenOwner: string; }; ` ##### amountDistributedPerOpen `type amountDistributedPerOpen = bigint; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### erc1155Rewards An array of ERC1155 rewards, see type `ERC1155Reward` for more info `type erc1155Rewards = Array<[ERC1155Reward](https://portal.thirdweb.com/references/typescript/v5/ERC1155Reward)>; ` ##### erc20Rewards An array of ERC20 rewards, see type `ERC20Reward` for more info `type erc20Rewards = Array<[ERC20Reward](https://portal.thirdweb.com/references/typescript/v5/ERC20Reward)>; ` ##### erc721Rewards An array of ERC721 rewards, see type `ERC721Reward` for more info `type erc721Rewards = Array<[ERC721Reward](https://portal.thirdweb.com/references/typescript/v5/ERC721Reward)>; ` ##### openStartTimestamp JavaScript Date object `type openStartTimestamp = Date; ` ##### packMetadata The metadata (image, description, etc.) of the Pack. This is similar to an NFT's metadata `type packMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; ` ##### recipient The address of the reward recipient `type recipient = string; ` ##### tokenOwner The address of the entity who owns the tokens that are used as rewards. This is only used for checking token approval `type tokenOwner = string; ` ## CreatePackParams Represents the parameters for the "createPack" function. `type CreatePackParams = WithOverrides<{ amountDistributedPerOpen: AbiParameterToPrimitiveType<{ name: "amountDistributedPerOpen"; type: "uint128"; }>; contents: AbiParameterToPrimitiveType<{ components: [ { name: "assetContract"; type: "address" }, { name: "tokenType"; type: "uint8" }, { name: "tokenId"; type: "uint256" }, { name: "totalAmount"; type: "uint256" }, ]; name: "contents"; type: "tuple[]"; }>; numOfRewardUnits: AbiParameterToPrimitiveType<{ name: "numOfRewardUnits"; type: "uint256[]"; }>; openStartTimestamp: AbiParameterToPrimitiveType<{ name: "openStartTimestamp"; type: "uint128"; }>; packUri: AbiParameterToPrimitiveType<{ name: "packUri"; type: "string"; }>; recipient: AbiParameterToPrimitiveType<{ name: "recipient"; type: "address"; }>; }>; ` ## CreatePoolParams Represents the parameters for the "createPool" function. `type CreatePoolParams = WithOverrides<{ fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; tokenA: AbiParameterToPrimitiveType<{ name: "tokenA"; type: "address"; }>; tokenB: AbiParameterToPrimitiveType<{ name: "tokenB"; type: "address"; }>; }>; ` ## CreatePackParams Represents the parameters for the "createPack" function. `type CreatePackParams = WithOverrides<{ amountDistributedPerOpen: AbiParameterToPrimitiveType<{ name: "amountDistributedPerOpen"; type: "uint128"; }>; contents: AbiParameterToPrimitiveType<{ components: [ { name: "assetContract"; type: "address" }, { name: "tokenType"; type: "uint8" }, { name: "tokenId"; type: "uint256" }, { name: "totalAmount"; type: "uint256" }, ]; name: "contents"; type: "tuple[]"; }>; numOfRewardUnits: AbiParameterToPrimitiveType<{ name: "numOfRewardUnits"; type: "uint256[]"; }>; openStartTimestamp: AbiParameterToPrimitiveType<{ name: "openStartTimestamp"; type: "uint128"; }>; packUri: AbiParameterToPrimitiveType<{ name: "packUri"; type: "string"; }>; recipient: AbiParameterToPrimitiveType<{ name: "recipient"; type: "address"; }>; }>; ` ## CreateWalletArgs Generic type for getting the tuple type of arguments that the `createWallet` function takes. `type CreateWalletArgs = [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions) extends undefined ? [id: T] : undefined extends [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions) ? [id: T, options: [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions)] : [id: T, options: [WalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/WalletCreationOptions)]; ` ### Example `type X = CreateWalletArgs<"io.metamask">; ` ## CurrencyApprovedForListingEventFilters Represents the filters for the "CurrencyApprovedForListing" event. `type CurrencyApprovedForListingEventFilters = Partial<{ currency: AbiParameterToPrimitiveType<{ indexed: true; name: "currency"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## CreateThirdwebClientOptions `type CreateThirdwebClientOptions = Prettify< ( | { clientId: string; secretKey?: string } | { clientId?: string; secretKey: string } ) & ClientOptions >; ` ## CurrencyPriceForListingParams `type CurrencyPriceForListingParams = { currency: Address; listingId: bigint; }; ` ##### currency `type currency = Address; ` ##### listingId `type listingId = bigint; ` ## CustodyOfParams Represents the parameters for the "custodyOf" function. `type CustodyOfParams = { fid: AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256" }>; }; ` ##### fid `type fid = AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256"; }>; ` ## DefaultWalletConnectRequestHandlers Default request handlers for WalletConnect requests. `let DefaultWalletConnectRequestHandlers: { eth_sendRawTransaction: {}; eth_sendTransaction: {}; eth_sign: {}; eth_signTransaction: {}; eth_signTypedData: {}; eth_signTypedData_v4: {}; personal_sign: {}; wallet_addEthereumChain: (_: { params: WalletConnectAddEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }) => never; wallet_switchEthereumChain: {}; }; ` ##### eth\_sendRawTransaction `type eth_sendRawTransaction = {}; ` ##### eth\_sendTransaction `type eth_sendTransaction = {}; ` ##### eth\_sign `type eth_sign = {}; ` ##### eth\_signTransaction `type eth_signTransaction = {}; ` ##### eth\_signTypedData `type eth_signTypedData = {}; ` ##### eth\_signTypedData\_v4 `type eth_signTypedData_v4 = {}; ` ##### personal\_sign `type personal_sign = {}; ` ##### wallet\_addEthereumChain ##### Signature `function wallet_addEthereumChain(_: { params: WalletConnectAddEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }): never; ` #### Parameters ##### \_ ##### Type `let _: { params: WalletConnectAddEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` #### Returns ##### Return Type `let returnType: never; ` ##### wallet\_switchEthereumChain `type wallet_switchEthereumChain = {}; ` ## DelegateParams Represents the parameters for the "delegate" function. `type DelegateParams = WithOverrides<{ delegatee: AbiParameterToPrimitiveType<{ name: "delegatee"; type: "address"; }>; }>; ` ## DeployERC20ContractOptions `type DeployERC20ContractOptions = Prettify< ClientAndChainAndAccount & { params: [ERC20ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractParams); publisher?: string; type: [ERC20ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractType); } >; ` ## DelegatesParams Represents the parameters for the "delegates" function. `type DelegatesParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ## DeployERC1155ContractOptions `type DeployERC1155ContractOptions = Prettify< ClientAndChainAndAccount & { params: [ERC1155ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractParams); type: [ERC1155ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractType); } >; ` ## DeployModularContractOptions `type DeployModularContractOptions = Prettify< ClientAndChainAndAccount & { core: [CoreType](https://portal.thirdweb.com/references/typescript/v5/CoreType); modules?: Array<[ModuleInstaller](https://portal.thirdweb.com/references/typescript/v5/ModuleInstaller)>; params: [ModularContractParams](https://portal.thirdweb.com/references/typescript/v5/ModularContractParams); publisher?: string; salt?: string; } >; ` ## DeployERC721ContractOptions `type DeployERC721ContractOptions = Prettify< ClientAndChainAndAccount & { params: [ERC721ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractParams); type: [ERC721ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractType); } >; ` ## DeployMarketplaceContractOptions `type DeployMarketplaceContractOptions = Prettify< ClientAndChainAndAccount & { params: [MarketplaceContractParams](https://portal.thirdweb.com/references/typescript/v5/MarketplaceContractParams) } & { version?: string; } >; ` ## DeployProxyByImplementationParams Represents the parameters for the "deployProxyByImplementation" function. `type DeployProxyByImplementationParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes" }>; implementation: AbiParameterToPrimitiveType<{ name: "implementation"; type: "address"; }>; salt: AbiParameterToPrimitiveType<{ name: "salt"; type: "bytes32"; }>; }>; ` ## DeployPublishedContractOptions `type DeployPublishedContractOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; contractParams?: Record; implementationConstructorParams?: Record; publisher?: string; salt?: string; version?: string; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### contractId `type contractId = string; ` ##### contractParams `type contractParams = Record; ` ##### implementationConstructorParams `type implementationConstructorParams = Record; ` ##### publisher `type publisher = string; ` ##### salt `type salt = string; ` ##### version `type version = string; ` ## DepositParams Represents the parameters for the "deposit" function. `type DepositParams = WithOverrides<{ assets: AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; }>; ` ## DepositEventFilters Represents the filters for the "Deposit" event. `type DepositEventFilters = Partial<{ caller: AbiParameterToPrimitiveType<{ indexed: true; name: "caller"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ indexed: true; name: "owner"; type: "address"; }>; }>; ` ## DirectPaymentOptions `type DirectPaymentOptions = { mode: "direct_payment"; paymentInfo: [PaymentInfo](https://portal.thirdweb.com/references/typescript/v5/PaymentInfo); }; ` ##### mode `type mode = "direct_payment"; ` ##### paymentInfo The payment information `type paymentInfo = [PaymentInfo](https://portal.thirdweb.com/references/typescript/v5/PaymentInfo); ` ## DirectListing `type DirectListing = { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; creatorAddress: Address; currencyContractAddress: Address; currencyValuePerToken: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; isReservedListing: boolean; pricePerToken: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; tokenId: bigint; type: "direct-listing"; }; ` ##### asset `type asset = [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); ` ##### assetContractAddress `type assetContractAddress = Address; ` ##### creatorAddress `type creatorAddress = Address; ` ##### currencyContractAddress `type currencyContractAddress = Address; ` ##### currencyValuePerToken `type currencyValuePerToken = [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); ` ##### endTimeInSeconds `type endTimeInSeconds = bigint; ` ##### id `type id = bigint; ` ##### isReservedListing `type isReservedListing = boolean; ` ##### pricePerToken `type pricePerToken = bigint; ` ##### quantity `type quantity = bigint; ` ##### startTimeInSeconds `type startTimeInSeconds = bigint; ` ##### status `type status = ListingStatus; ` ##### tokenId `type tokenId = bigint; ` ##### type `type type = "direct-listing"; ` ## EIP1193Provider `type EIP1193Provider = { request: (params: any) => Promise; on: (event: any, listener: (params: any) => any) => void; removeListener: ( event: any, listener: (params: any) => any, ) => void; }; ` ##### request ##### Signature `function request(params: any): Promise; ` ##### Parameters ##### params ###### Type `let params: any; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### on ##### Signature `function on(event: any, listener: (params: any) => any): void; ` ##### Parameters ##### event ###### Type `let event: any; ` ##### listener ###### Type `let listener: (params: any) => any; ` ##### Returns ##### Return Type `let returnType: void; ` ##### removeListener ##### Signature `function removeListener( event: any, listener: (params: any) => any, ): void; ` ##### Parameters ##### event ###### Type `let event: any; ` ##### listener ###### Type `let listener: (params: any) => any; ` ##### Returns ##### Return Type `let returnType: void; ` ## ERC1155ContractParams `type ERC1155ContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; platformFeeBps?: bigint; platformFeeRecipient?: string; royaltyBps?: bigint; royaltyRecipient?: string; saleRecipient?: string; social_urls?: Record; symbol?: string; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### platformFeeBps `type platformFeeBps = bigint; ` ##### platformFeeRecipient `type platformFeeRecipient = string; ` ##### royaltyBps `type royaltyBps = bigint; ` ##### royaltyRecipient `type royaltyRecipient = string; ` ##### saleRecipient `type saleRecipient = string; ` ##### social\_urls `type social_urls = Record; ` ##### symbol `type symbol = string; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## ERC1155Reward `type ERC1155Reward = { contractAddress: string; quantityPerReward: number | string; tokenId: bigint; totalRewards: number | string; }; ` ##### contractAddress `type contractAddress = string; ` ##### quantityPerReward `type quantityPerReward = number | string; ` ##### tokenId `type tokenId = bigint; ` ##### totalRewards `type totalRewards = number | string; ` ## ERC20ContractParams `type ERC20ContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; platformFeeBps?: bigint; platformFeeRecipient?: string; saleRecipient?: string; social_urls?: Record; symbol?: string; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### platformFeeBps `type platformFeeBps = bigint; ` ##### platformFeeRecipient `type platformFeeRecipient = string; ` ##### saleRecipient `type saleRecipient = string; ` ##### social\_urls `type social_urls = Record; ` ##### symbol `type symbol = string; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## ERC721ContractParams `type ERC721ContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; platformFeeBps?: bigint; platformFeeRecipient?: string; royaltyBps?: bigint; royaltyRecipient?: string; saleRecipient?: string; social_urls?: Record; symbol?: string; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### platformFeeBps `type platformFeeBps = bigint; ` ##### platformFeeRecipient `type platformFeeRecipient = string; ` ##### royaltyBps `type royaltyBps = bigint; ` ##### royaltyRecipient `type royaltyRecipient = string; ` ##### saleRecipient `type saleRecipient = string; ` ##### social\_urls `type social_urls = Record; ` ##### symbol `type symbol = string; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## ERC20Reward `type ERC20Reward = { contractAddress: string; quantityPerReward: number | string; totalRewards: number | string; }; ` ##### contractAddress `type contractAddress = string; ` ##### quantityPerReward `type quantityPerReward = number | string; ` ##### totalRewards `type totalRewards = number | string; ` ## ERC721Reward `type ERC721Reward = { contractAddress: string; tokenId: bigint }; ` ##### contractAddress `type contractAddress = string; ` ##### tokenId `type tokenId = bigint; ` ## EcosystemWalletCreationOptions `type EcosystemWalletCreationOptions = { auth?: { defaultSmsCountryCode?: SupportedSmsCountry; mode?: "popup" | "redirect" | "window"; redirectUrl?: string; }; partnerId?: string; storage?: [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage); }; ` ##### auth `type auth = { defaultSmsCountryCode?: SupportedSmsCountry; mode?: "popup" | "redirect" | "window"; redirectUrl?: string; }; ` ##### partnerId The partnerId of the ecosystem wallet to connect to `type partnerId = string; ` ##### storage The storage to use for storing wallet state `type storage = [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage); ` ## Ed25519Keypair `type Ed25519Keypair = { privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); publicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ##### privateKey `type privateKey = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### publicKey `type publicKey = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## EditionMintParams `type EditionMintParams = { amount: bigint; nft: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; to: string; tokenId?: bigint; }; ` ##### amount `type amount = bigint; ` ##### nft `type nft = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; ` ##### to `type to = string; ` ##### tokenId `type tokenId = bigint; ` ## EnableFeeAmountParams Represents the parameters for the "enableFeeAmount" function. `type EnableFeeAmountParams = WithOverrides<{ fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; tickSpacing: AbiParameterToPrimitiveType<{ name: "tickSpacing"; type: "int24"; }>; }>; ` ## EngineAccountOptions Options for creating an engine account. `type EngineAccountOptions = { authToken: string; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); engineUrl: string; walletAddress: string; }; ` ##### authToken The auth token to use with the engine instance. `type authToken = string; ` ##### chain The chain to use for signing messages and typed data (smart backend wallet only). `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### engineUrl The URL of your engine instance. `type engineUrl = string; ` ##### walletAddress The backend wallet to use for sending transactions inside engine. `type walletAddress = string; ` ## EnglishAuction `type EnglishAuction = { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; buyoutCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; minimumBidCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction"; }; ` ##### asset `type asset = [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); ` ##### assetContractAddress `type assetContractAddress = Address; ` ##### bidBufferBps `type bidBufferBps = bigint; ` ##### buyoutBidAmount `type buyoutBidAmount = bigint; ` ##### buyoutCurrencyValue `type buyoutCurrencyValue = [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); ` ##### creatorAddress `type creatorAddress = Address; ` ##### currencyContractAddress `type currencyContractAddress = Address; ` ##### endTimeInSeconds `type endTimeInSeconds = bigint; ` ##### id `type id = bigint; ` ##### minimumBidAmount `type minimumBidAmount = bigint; ` ##### minimumBidCurrencyValue `type minimumBidCurrencyValue = [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); ` ##### quantity `type quantity = bigint; ` ##### startTimeInSeconds `type startTimeInSeconds = bigint; ` ##### status `type status = ListingStatus; ` ##### timeBufferInSeconds `type timeBufferInSeconds = bigint; ` ##### tokenId `type tokenId = bigint; ` ##### type `type type = "english-auction"; ` ## EngineOptions `type EngineOptions = { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; experimentalChainlessSupport?: boolean; provider: "engine"; relayerForwarderAddress: Address; relayerUrl: string; }; ` ##### domainName `type domainName = string; ` ##### domainSeparatorVersion `type domainSeparatorVersion = string; ` ##### domainVersion `type domainVersion = string; ` ##### experimentalChainlessSupport `type experimentalChainlessSupport = boolean; ` ##### provider `type provider = "engine"; ` ##### relayerForwarderAddress `type relayerForwarderAddress = Address; ` ##### relayerUrl `type relayerUrl = string; ` ## EnsProfile `type EnsProfile = { address?: string; avatar?: string; description?: string; discord?: string; display?: string; email?: string; github?: string; keywords?: Array; location?: string; mail?: string; name?: string; notice?: string; phone?: string; telegram?: string; twitter?: string; url?: string; }; ` ##### address `type address = string; ` ##### avatar `type avatar = string; ` ##### description `type description = string; ` ##### discord `type discord = string; ` ##### display `type display = string; ` ##### email `type email = string; ` ##### github `type github = string; ` ##### keywords `type keywords = Array; ` ##### location `type location = string; ` ##### mail `type mail = string; ` ##### name `type name = string; ` ##### notice `type notice = string; ` ##### phone `type phone = string; ` ##### telegram `type telegram = string; ` ##### twitter `type twitter = string; ` ##### url `type url = string; ` ## CreateDirectListingButton This button is used to create Direct listings for the thirdweb Marketplace v3 contract It uses the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton)and the [createListing extension](https://portal.thirdweb.com/references/typescript/v5/marketplace/createListing) under the hood which means it inherits all the props of those 2 components. ### Example `` import { CreateDirectListingButton } from "thirdweb/react"; > Sell NFT `` For error handling & callbacks on transaction-sent and transaction-confirmed, please refer to the TransactionButton docs. ##### Signature `function CreateDirectListingButton( props: [CreateDirectListingButtonProps](https://portal.thirdweb.com/references/typescript/v5/CreateDirectListingButtonProps), ): Element; ` ### Parameters ##### props #### Type `let props: Omit<[TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps), "transaction"> & [CreateListingParams](https://portal.thirdweb.com/references/typescript/v5/CreateListingParams) & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractAddress: string; }; ` ### Returns ##### Return Type `let returnType: Element; ` ## EstimateGasOptions `type EstimateGasOptions = Prettify< { transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); from?: never } | { account?: never; from?: string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } ) >; ` ## Erc6492Signature `type Erc6492Signature = { address: string; data: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); signature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); }; ` ##### address `type address = string; ` ##### data `type data = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### signature `type signature = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## EstimateGasCostResult `type EstimateGasCostResult = { ether: string; wei: bigint }; ` ##### ether The estimated gas cost in ether. `type ether = string; ` ##### wei The estimated gas cost in wei. `type wei = bigint; ` ## ExactInputParams Represents the parameters for the "exactInput" function. `type ExactInputParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ components: [ { name: "path"; type: "bytes" }, { name: "recipient"; type: "address" }, { name: "deadline"; type: "uint256" }, { name: "amountIn"; type: "uint256" }, { name: "amountOutMinimum"; type: "uint256" }, ]; name: "params"; type: "tuple"; }>; }>; ` ## ExactInputSingleParams Represents the parameters for the "exactInputSingle" function. `type ExactInputSingleParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ components: [ { name: "tokenIn"; type: "address" }, { name: "tokenOut"; type: "address" }, { name: "fee"; type: "uint24" }, { name: "recipient"; type: "address" }, { name: "deadline"; type: "uint256" }, { name: "amountIn"; type: "uint256" }, { name: "amountOutMinimum"; type: "uint256" }, { name: "sqrtPriceLimitX96"; type: "uint160" }, ]; name: "params"; type: "tuple"; }>; }>; ` ## ExactOutputParams Represents the parameters for the "exactOutput" function. `type ExactOutputParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ components: [ { name: "path"; type: "bytes" }, { name: "recipient"; type: "address" }, { name: "deadline"; type: "uint256" }, { name: "amountOut"; type: "uint256" }, { name: "amountInMaximum"; type: "uint256" }, ]; name: "params"; type: "tuple"; }>; }>; ` ## ExecuteParams Represents the parameters for the "execute" function. `type ExecuteParams = WithOverrides<{ calldatas: AbiParameterToPrimitiveType<{ name: "calldatas"; type: "bytes[]"; }>; descriptionHash: AbiParameterToPrimitiveType<{ name: "descriptionHash"; type: "bytes32"; }>; targets: AbiParameterToPrimitiveType<{ name: "targets"; type: "address[]"; }>; values: AbiParameterToPrimitiveType<{ name: "values"; type: "uint256[]"; }>; }>; ` ## ExactOutputSingleParams Represents the parameters for the "exactOutputSingle" function. `type ExactOutputSingleParams = WithOverrides<{ params: AbiParameterToPrimitiveType<{ components: [ { name: "tokenIn"; type: "address" }, { name: "tokenOut"; type: "address" }, { name: "fee"; type: "uint24" }, { name: "recipient"; type: "address" }, { name: "deadline"; type: "uint256" }, { name: "amountOut"; type: "uint256" }, { name: "amountInMaximum"; type: "uint256" }, { name: "sqrtPriceLimitX96"; type: "uint160" }, ]; name: "params"; type: "tuple"; }>; }>; ` ## ExecuteSaleParams `type ExecuteSaleParams = { auctionId: bigint }; ` ##### auctionId `type auctionId = bigint; ` ## FarcasterContractOptions Represents the options to retrieve a Farcaster contract `type FarcasterContractOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## FeeAmountTickSpacingParams Represents the parameters for the "feeAmountTickSpacing" function. `type FeeAmountTickSpacingParams = { fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; }; ` ##### fee `type fee = AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24"; }>; ` ## ExtendedMetadata `type ExtendedMetadata = { audit?: string; bytecodeUri: string; changelog?: string; compilers?: Record< "solc" | "zksolc", Array<{ bytecodeUri: string; compilerVersion: string; evmVersion: string; metadataUri: string; }> >; compositeAbi?: Abi; constructorParams?: Record< string, { defaultValue?: string; description?: string; displayName?: string; dynamicValue?: DynamicParams; hidden?: boolean; } >; defaultExtensions?: Array<{ extensionName: string; extensionVersion: string; publisherAddress: string; }>; defaultModules?: Array<{ moduleName: string; moduleVersion: string; publisherAddress: string; }>; deployType?: "standard" | "autoFactory" | "customFactory"; description?: string; displayName?: string; externalLinks?: Array<{ name: string; url: string }>; factoryDeploymentData?: { customFactoryInput?: { customFactoryAddresses: Record; factoryFunction: string; params: Array<{ name: string; type: string }>; }; factoryAddresses?: Record; implementationAddresses: Record; implementationInitializerFunction: string; modularFactoryInput?: { hooksParamName: string }; }; implConstructorParams?: Record< string, { defaultValue?: string; dynamicValue?: DynamicParams } >; isDeployableViaFactory?: boolean; isDeployableViaProxy?: boolean; logo?: string; metadataUri: string; name: string; networksForDeployment?: { allNetworks?: boolean; networksEnabled?: Array; }; publisher?: string; readme?: string; routerType?: "none" | "plugin" | "dynamic" | "modular"; tags?: Array; version: string; }; ` ##### audit `type audit = string; ` ##### bytecodeUri `type bytecodeUri = string; ` ##### changelog `type changelog = string; ` ##### compilers `type compilers = Record< "solc" | "zksolc", Array<{ bytecodeUri: string; compilerVersion: string; evmVersion: string; metadataUri: string; }> >; ` ##### compositeAbi `type compositeAbi = Abi; ` ##### constructorParams `type constructorParams = Record< string, { defaultValue?: string; description?: string; displayName?: string; dynamicValue?: DynamicParams; hidden?: boolean; } >; ` ##### defaultExtensions `type defaultExtensions = Array<{ extensionName: string; extensionVersion: string; publisherAddress: string; }>; ` ##### defaultModules `type defaultModules = Array<{ moduleName: string; moduleVersion: string; publisherAddress: string; }>; ` ##### deployType `type deployType = "standard" | "autoFactory" | "customFactory"; ` ##### description `type description = string; ` ##### displayName `type displayName = string; ` ##### externalLinks `type externalLinks = Array<{ name: string; url: string }>; ` ##### factoryDeploymentData `type factoryDeploymentData = { customFactoryInput?: { customFactoryAddresses: Record; factoryFunction: string; params: Array<{ name: string; type: string }>; }; factoryAddresses?: Record; implementationAddresses: Record; implementationInitializerFunction: string; modularFactoryInput?: { hooksParamName: string }; }; ` ##### implConstructorParams `type implConstructorParams = Record< string, { defaultValue?: string; dynamicValue?: DynamicParams } >; ` ##### isDeployableViaFactory `type isDeployableViaFactory = boolean; ` ##### isDeployableViaProxy `type isDeployableViaProxy = boolean; ` ##### logo `type logo = string; ` ##### metadataUri `type metadataUri = string; ` ##### name `type name = string; ` ##### networksForDeployment `type networksForDeployment = { allNetworks?: boolean; networksEnabled?: Array; }; ` ##### publisher `type publisher = string; ` ##### readme `type readme = string; ` ##### routerType `type routerType = "none" | "plugin" | "dynamic" | "modular"; ` ##### tags `type tags = Array; ` ##### version `type version = string; ` ## ExistsParams Represents the parameters for the "exists" function. `type ExistsParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## FarcasterProfile `type FarcasterProfile = { addresses?: Array; bio?: string; custodyAddress?: string; display?: string; fid?: number; pfp?: string; username?: string; }; ` ##### addresses `type addresses = Array; ` ##### bio `type bio = string; ` ##### custodyAddress `type custodyAddress = string; ` ##### display `type display = string; ` ##### fid `type fid = number; ` ##### pfp `type pfp = string; ` ##### username `type username = string; ` ## FromBytesReturnType `type FromBytesReturnType = TTo extends "string" ? string : TTo extends "hex" ? [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) : TTo extends "bigint" ? bigint : TTo extends "number" ? number : TTo extends "boolean" ? boolean : never; ` ## FromHexReturnType `type FromHexReturnType = TTo extends "string" ? string : TTo extends "bigint" ? bigint : TTo extends "number" ? number : TTo extends "bytes" ? Uint8Array : TTo extends "boolean" ? boolean : never; ` ## FromBytesParameters `type FromBytesParameters< TTo extends "string" | "hex" | "bigint" | "number" | "boolean", > = TTo | { size?: number; to: TTo }; ` ## FromHexParameters `type FromHexParameters< TTo extends "string" | "bigint" | "number" | "bytes" | "boolean", > = TTo | { size?: number; to: TTo }; ` ## FullProfileResponse `type FullProfileResponse = { handle: string; joinDate: bigint | null; profileData: [LensProfileSchema](https://portal.thirdweb.com/references/typescript/v5/LensProfileSchema) | null; } | null; ` ## FundWalletOptions `type FundWalletOptions = { mode?: "fund_wallet"; prefillBuy?: { allowEdits?: { amount: boolean; chain: boolean; token: boolean }; amount?: string; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); token?: [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); }; }; ` ##### mode `type mode = "fund_wallet"; ` ##### prefillBuy Prefill the Buy Token amount, chain and/or token. You can also disable the edits for the prefilled values using `allowEdits` \- By default all are editable For example, if you want to allow changing the amount, but disable changing the token and chain, you can set `allowEdits` to `{ amount: true, token: false, chain: false }` If no `token` object is not specified, native token will be prefilled by default `type prefillBuy = { allowEdits?: { amount: boolean; chain: boolean; token: boolean }; amount?: string; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); token?: [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); }; ` ## FromEip1193AdapterOptions Options for creating an EIP-1193 provider adapter. `type FromEip1193AdapterOptions = { provider: [EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider) | (() => Promise<[EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider)>); walletId?: [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); }; ` ##### provider `type provider = [EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider) | (() => Promise<[EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider)>); ` ##### walletId `type walletId = [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); ` ## GenerateAirdropERC1155SignatureOptions `type GenerateAirdropERC1155SignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### airdropRequest `type airdropRequest = GenerateReqInput; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ## GaslessOptions Gasless configs for sending gasless transactions. This config is used in: * [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) * [sendTransaction](https://portal.thirdweb.com/references/typescript/v5/sendTransaction) * [useSendTransaction](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction) * [sendAndConfirmTransaction](https://portal.thirdweb.com/references/typescript/v5/sendAndConfirmTransaction) * [useSendAndConfirmTransaction](https://portal.thirdweb.com/references/typescript/v5/useSendAndConfirmTransaction) Please refer to the docs of those components above for more info. `type GaslessOptions = | [EngineOptions](https://portal.thirdweb.com/references/typescript/v5/EngineOptions) | [OpenZeppelinOptions](https://portal.thirdweb.com/references/typescript/v5/OpenZeppelinOptions) | [BiconomyOptions](https://portal.thirdweb.com/references/typescript/v5/BiconomyOptions); ` ## GenerateAirdropERC721SignatureOptions `type GenerateAirdropERC721SignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### airdropRequest `type airdropRequest = GenerateReqInput; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ## GenerateAccountOptions `type GenerateAccountOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## GenerateLoginPayloadParams `type GenerateLoginPayloadParams = { address: string; chainId?: number; }; ` ##### address `type address = string; ` ##### chainId `type chainId = number; ` ## GenerateAirdropERC20SignatureOptions `type GenerateAirdropERC20SignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### airdropRequest `type airdropRequest = GenerateReqInput; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ## GenerateMerkleTreeInfoERC1155Params `type GenerateMerkleTreeInfoERC1155Params = { snapshot: Array; tokenAddress: string; }; ` ##### snapshot `type snapshot = Array; ` ##### tokenAddress `type tokenAddress = string; ` ## GenerateMerkleTreeInfoERC721Params `type GenerateMerkleTreeInfoERC721Params = { snapshot: Array; tokenAddress: string; }; ` ##### snapshot `type snapshot = Array; ` ##### tokenAddress `type tokenAddress = string; ` ## GenerateMerkleTreeInfoERC20Params `type GenerateMerkleTreeInfoERC20Params = { snapshot: Array; tokenAddress: string; }; ` ##### snapshot `type snapshot = Array; ` ##### tokenAddress `type tokenAddress = string; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions< T extends "LoyaltyCard" | "TokenERC721" = "TokenERC721", > = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: T; mintRequest: GeneratePayloadInput; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### contractType `type contractType = T; ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ## GetAccountsOfSignerParams Represents the parameters for the "getAccountsOfSigner" function. `type GetAccountsOfSignerParams = { signer: AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; }; ` ##### signer `type signer = AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); mintRequest: GeneratePayloadInput; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); mintRequest: GeneratePayloadInput; nft: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ##### nft `type nft = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### contractType `type contractType = "TokenERC1155" | "SignatureMintERC1155"; ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); mintRequest: GeneratePayloadInput; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ## GetAllAuctionParams `type GetAllAuctionParams = { count?: bigint; start?: number }; ` ##### count The number of listings to retrieve. `type count = bigint; ` ##### start The start index of the listings to retrieve. `type start = number; ` ## GetAllListingParams `type GetAllListingParams = { count?: bigint; start?: number }; ` ##### count The number of listings to retrieve. `type count = bigint; ` ##### start The start index of the listings to retrieve. `type start = number; ` ## GetAllOffersParams `type GetAllOffersParams = { count?: bigint; start?: number }; ` ##### count The number of offers to retrieve. `type count = bigint; ` ##### start The start index of the offers to retrieve. `type start = number; ` ## GetAllParams Represents the parameters for the "getAll" function. `type GetAllParams = { deployer: AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; }; ` ##### deployer `type deployer = AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; ` ## GetAllOwnersParams Parameters for retrieving NFTs. `type GetAllOwnersParams = { count?: number; start?: number }; ` ##### count The number of NFTs to retrieve. `type count = number; ` ##### start Which tokenId to start at. `type start = number; ` ## GetAllPublishedContractsParams Represents the parameters for the "getAllPublishedContracts" function. `type GetAllPublishedContractsParams = { publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; }; ` ##### publisher `type publisher = AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; ` ## GetAllValidAuctionParams `type GetAllValidAuctionParams = { count?: bigint; start?: number }; ` ##### count The number of listings to retrieve. `type count = bigint; ` ##### start The start index of the listings to retrieve. `type start = number; ` ## GenerateMintSignatureOptions `type GenerateMintSignatureOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); mintRequest: GeneratePayloadInput; nfts: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### mintRequest `type mintRequest = GeneratePayloadInput; ` ##### nfts `type nfts = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; ` ## GetAllValidOffersParams `type GetAllValidOffersParams = { count?: bigint; start?: number }; ` ##### count The number of offers to retrieve. `type count = bigint; ` ##### start The start index of the offers to retrieve. `type start = number; ` ## GetAllRoleMembersParams `type GetAllRoleMembersParams = { role: RoleInput }; ` ##### role `type role = RoleInput; ` ## GetApprovalForTransactionParams `type GetApprovalForTransactionParams = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); }; ` ##### account The caller's account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### transaction The transaction that involves the ERC20 token `type transaction = [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ## GetAuthenticatedUserParams `type GetAuthenticatedUserParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### ecosystem `type ecosystem = Ecosystem; ` ## GetAllValidListingParams `type GetAllValidListingParams = { count?: bigint; start?: number }; ` ##### count The number of listings to retrieve. `type count = bigint; ` ##### start The start index of the listings to retrieve. `type start = number; ` ## GetBalanceParams Represents the parameters for retrieving the balance of an address. `type GetBalanceParams = { address: string }; ` ##### address The address for which to retrieve the balance. `type address = string; ` ## GetBalanceResult Represents the result of a balance query for an ERC20 token. `type GetBalanceResult = { decimals: number; displayValue: string; name: string; symbol: string; value: bigint; }; ` ##### decimals `type decimals = number; ` ##### displayValue `type displayValue = string; ` ##### name `type name = string; ` ##### symbol `type symbol = string; ` ##### value `type value = bigint; ` ## GetBlockHashParams Represents the parameters for the "getBlockHash" function. `type GetBlockHashParams = { blockNumber: AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; }; ` ##### blockNumber `type blockNumber = AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; ` ## GetBuyWithFiatQuoteParams Parameters for [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function `type GetBuyWithFiatQuoteParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromAmount?: string; fromCurrencySymbol: CurrencyMeta["shorthand"]; isTestMode?: boolean; maxSlippageBPS?: number; preferredProvider?: FiatProvider; purchaseData?: object; toAddress: string; toAmount?: string; toChainId: number; toGasAmountWei?: string; toTokenAddress: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### fromAddress The address of the wallet which will be used to buy the token. `type fromAddress = string; ` ##### fromAmount The amount of fiat currency to spend to buy the token. This is useful if you want to buy whatever amount of token you can get for a certain amount of fiat currency. If you want a certain amount of token, you can provide `toAmount` instead of `fromAmount` . `type fromAmount = string; ` ##### fromCurrencySymbol Symbol of the fiat currency to buy the token with. `type fromCurrencySymbol = CurrencyMeta["shorthand"]; ` ##### isTestMode Whether to use on-ramp provider in test mode for testing purpose or not. Defaults to `false` `type isTestMode = boolean; ` ##### maxSlippageBPS The maximum slippage in basis points (bps) allowed for the transaction. For example, if you want to allow a maximum slippage of 0.5%, you should specify `50` bps. `type maxSlippageBPS = number; ` ##### preferredProvider Optional parameter to specify the preferred onramp provider. By default, we choose a recommended provider based on the location of the user, KYC status, and currency. `type preferredProvider = FiatProvider; ` ##### purchaseData Extra details to store with the purchase. This details will be stored with the purchase and can be retrieved later via the status API or Webhook `type purchaseData = object; ` ##### toAddress The address of the wallet where the tokens will be sent. `type toAddress = string; ` ##### toAmount The amount of token to buy This is useful if you want to get a certain amount of token. If you want to buy however much token you can get for a certain amount of fiat currency, you can provide `fromAmount` instead of `toAmount` . `type toAmount = string; ` ##### toChainId Chain id of the token to buy. `type toChainId = number; ` ##### toGasAmountWei Optional parameter to onramp gas with the purchase If native token, will onramp extra native token amount If erc20, will onramp native token + erc20 `type toGasAmountWei = string; ` ##### toTokenAddress Token address of the token to buy. `type toTokenAddress = string; ` ## GetBuyWithCryptoQuoteParams The parameters for [getBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoQuote) function It includes information about which tokens to swap, the amount of tokens to swap, slippage, etc. `type GetBuyWithCryptoQuoteParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromChainId: number; fromTokenAddress: string; intentId?: string; maxSlippageBPS?: number; purchaseData?: object; toAddress: string; toChainId: number; toTokenAddress: string; } & ( | { fromAmount: string; toAmount?: never } | { fromAmount?: never; toAmount: string } ); ` ## GetBuyWithCryptoTransferParams The parameters for [getBuyWithCryptoTransfer](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoTransfer) function It facilitates a token transfer. `type GetBuyWithCryptoTransferParams = { amount: string; chainId: number; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; purchaseData?: object; toAddress: string; tokenAddress: string; }; ` ##### amount The amount of token to be transferred. `type amount = string; ` ##### chainId The chain id of the transfer token. `type chainId = number; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### fromAddress The address of wallet that pays for the tokens. `type fromAddress = string; ` ##### purchaseData Extra details to store with the purchase. This details will be stored with the purchase and can be retrieved later via the status API or Webhook `type purchaseData = object; ` ##### toAddress The address of the wallet where the tokens are sent `type toAddress = string; ` ##### tokenAddress The token address of the transfer token. `type tokenAddress = string; ` ## GetCapabilitiesOptions `type GetCapabilitiesOptions = { wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ##### wallet `type wallet = [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ## GetCallsStatusOptions `type GetCallsStatusOptions = { bundleId: [WalletSendCallsId](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsId); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ##### bundleId `type bundleId = [WalletSendCallsId](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsId); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### wallet `type wallet = [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ## GetBuyWithFiatStatusParams Parameters for the [getBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatStatus) function `type GetBuyWithFiatStatusParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); intentId: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### intentId Intent ID of the "Buy with fiat" transaction. You can get the intent ID from the quote object returned by the [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function `type intentId = string; ` ## GetClaimConditionByIdParams Represents the parameters for the "getClaimConditionById" function. `type GetClaimConditionByIdParams = { conditionId: AbiParameterToPrimitiveType<{ name: "_conditionId"; type: "uint256"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### conditionId `type conditionId = AbiParameterToPrimitiveType<{ name: "_conditionId"; type: "uint256"; }>; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## GetCallsStatusResponse `type GetCallsStatusResponse = { receipts: Array<[WalletCallReceipt](https://portal.thirdweb.com/references/typescript/v5/WalletCallReceipt)>; status: "PENDING" | "CONFIRMED"; }; ` ##### receipts `type receipts = Array< [WalletCallReceipt](https://portal.thirdweb.com/references/typescript/v5/WalletCallReceipt) >; ` ##### status `type status = "PENDING" | "CONFIRMED"; ` ## GetClaimParamsOptions `type GetClaimParamsOptions = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); from?: string; quantity: bigint; singlePhaseDrop?: boolean; to: string; } & ( | { type: "erc721" } | { tokenDecimals: number; type: "erc20" } | { tokenId: bigint; type: "erc1155" } ); ` ## GetContractEventsOptions `type GetContractEventsOptions< abi extends Abi, abiEvents extends Array<[PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>, TStrict extends boolean, > = Prettify< GetContractEventsOptionsDirect & GetLogsBlockParams >; ` ## GetContentURIParams Represents the parameters for the "getContentURI" function. `type GetContentURIParams = { profileId: AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; pubId: AbiParameterToPrimitiveType<{ name: "pubId"; type: "uint256"; }>; }; ` ##### profileId `type profileId = AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; ` ##### pubId `type pubId = AbiParameterToPrimitiveType<{ name: "pubId"; type: "uint256"; }>; ` ## GetContractEventsResult `type GetContractEventsResult< abiEvents extends Array<[PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>, TStrict extends boolean, > = [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult); ` ## GetEthBalanceParams Represents the parameters for the "getEthBalance" function. `type GetEthBalanceParams = { addr: AbiParameterToPrimitiveType<{ name: "addr"; type: "address"; }>; }; ` ##### addr `type addr = AbiParameterToPrimitiveType<{ name: "addr"; type: "address"; }>; ` ## GetCurrencyMetadataResult `type GetCurrencyMetadataResult = { decimals: number; name: string; symbol: string; }; ` ##### decimals `type decimals = number; ` ##### name `type name = string; ` ##### symbol `type symbol = string; ` ## GetClaimConditionsParams `type GetClaimConditionsParams = { tokenId: bigint }; ` ##### tokenId `type tokenId = bigint; ` ## GetFidParams `type GetFidParams = { address: Address; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; }; ` ##### address `type address = Address; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ## GetFollowDataParams Represents the parameters for the "getFollowData" function. `type GetFollowDataParams = { followTokenId: AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; }; ` ##### followTokenId `type followTokenId = AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; ` ## GetFollowTokenIdParams Represents the parameters for the "getFollowTokenId" function. `type GetFollowTokenIdParams = { followerProfileId: AbiParameterToPrimitiveType<{ name: "followerProfileId"; type: "uint256"; }>; }; ` ##### followerProfileId `type followerProfileId = AbiParameterToPrimitiveType<{ name: "followerProfileId"; type: "uint256"; }>; ` ## GetFollowerProfileIdParams Represents the parameters for the "getFollowerProfileId" function. `type GetFollowerProfileIdParams = { followTokenId: AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; }; ` ##### followTokenId `type followTokenId = AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; ` ## GetFullProfileParams `type GetFullProfileParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); includeJoinDate?: boolean; overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; lensHubAddress?: string; tokenHandleRegistryAddress?: string; }; profileId: bigint; }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### includeJoinDate `type includeJoinDate = boolean; ` ##### overrides Override variables for Lens smart contracts Make sure all of them have to be on the same network `type overrides = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; lensHubAddress?: string; tokenHandleRegistryAddress?: string; }; ` ##### profileId `type profileId = bigint; ` ## GetHandleFromProfileIdParams `type GetHandleFromProfileIdParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; tokenHandleRegistryAddress?: string; }; profileId: bigint; }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### overrides Override variables for LensHandle contract and TokenHandleRegistry contract Make sure both of them have to be on the same network `type overrides = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; tokenHandleRegistryAddress?: string; }; ` ##### profileId `type profileId = bigint; ` ## GetGasPriceOptions `type GetGasPriceOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); percentMultiplier?: number; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### percentMultiplier `type percentMultiplier = number; ` ## GetDefaultHandleParams Represents the parameters for the "getDefaultHandle" function. `type GetDefaultHandleParams = { profileId: AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; }; ` ##### profileId `type profileId = AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; ` ## GetHandleParams Represents the parameters for the "getHandle" function. `type GetHandleParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## GetLocalNameParams Represents the parameters for the "getLocalName" function. `type GetLocalNameParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## GetNFTParams Parameters for getting an NFT. `type GetNFTParams = { tokenId: bigint }; ` ##### tokenId `type tokenId = bigint; ` ## GetModuleTypesParams Represents the parameters for the "getModuleTypes" function. `type GetModuleTypesParams = { moduleAddress: AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; }; ` ##### moduleAddress `type moduleAddress = AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; ` ## GetMetadataUriParams Represents the parameters for the "getMetadataUri" function. `type GetMetadataUriParams = { chainId: AbiParameterToPrimitiveType<{ name: "_chainId"; type: "uint256"; }>; deployment: AbiParameterToPrimitiveType<{ name: "_deployment"; type: "address"; }>; }; ` ##### chainId `type chainId = AbiParameterToPrimitiveType<{ name: "_chainId"; type: "uint256"; }>; ` ##### deployment `type deployment = AbiParameterToPrimitiveType<{ name: "_deployment"; type: "address"; }>; ` ## GetNFTsParams Parameters for retrieving NFTs. `type GetNFTsParams = { count?: number; includeOwners?: boolean; start?: number; tokenByIndex?: boolean; }; ` ##### count The number of NFTs to retrieve. `type count = number; ` ##### includeOwners Whether to include the owner of each NFT. `type includeOwners = boolean; ` ##### start Which tokenId to start at. `type start = number; ` ##### tokenByIndex Whether to check and fetch tokenID by index, in case of non-sequential IDs. It should be set to true if it's an ERC721Enumerable contract, and has `tokenByIndex` function. In this case, the provided tokenId will be considered as token-index and actual tokenId will be fetched from the contract. `type tokenByIndex = boolean; ` ## GetNFTsParams Parameters for retrieving NFTs. `type GetNFTsParams = { count?: number; start?: number }; ` ##### count The number of NFTs to retrieve. `type count = number; ` ##### start Which tokenId to start at. `type start = number; ` ## GetNonceParams `type GetNonceParams = { address: Address; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; }; ` ##### address `type address = Address; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ## GetOriginalFollowTimestampParams Represents the parameters for the "getOriginalFollowTimestamp" function. `type GetOriginalFollowTimestampParams = { followTokenId: AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; }; ` ##### followTokenId `type followTokenId = AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; ` ## GetPackContentsParams Represents the parameters for the "getPackContents" function. `type GetPackContentsParams = { packId: AbiParameterToPrimitiveType<{ name: "_packId"; type: "uint256"; }>; }; ` ##### packId `type packId = AbiParameterToPrimitiveType<{ name: "_packId"; type: "uint256"; }>; ` ## GetOwnedTokenIdsParams Parameters for retrieving owned tokenIds of an ERC1155 contract. `type GetOwnedTokenIdsParams = { address: string; count?: number; start?: number; }; ` ##### address The address of the wallet to get the NFTs of. `type address = string; ` ##### count The number of NFTs to retrieve. `type count = number; ` ##### start Which tokenId to start at. `type start = number; ` ## GetPermissionsForSignerParams Represents the parameters for the "getPermissionsForSigner" function. `type GetPermissionsForSignerParams = { signer: AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; }; ` ##### signer `type signer = AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; ` ## GetPoolParams Represents the parameters for the "getPool" function. `type GetPoolParams = { fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; tokenA: AbiParameterToPrimitiveType<{ name: "tokenA"; type: "address"; }>; tokenB: AbiParameterToPrimitiveType<{ name: "tokenB"; type: "address"; }>; }; ` ##### fee `type fee = AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24"; }>; ` ##### tokenA `type tokenA = AbiParameterToPrimitiveType<{ name: "tokenA"; type: "address"; }>; ` ##### tokenB `type tokenB = AbiParameterToPrimitiveType<{ name: "tokenB"; type: "address"; }>; ` ## GetPostOnRampQuoteParams The parameters for [getPostOnRampQuote](https://portal.thirdweb.com/references/typescript/v5/getPostOnRampQuote) function `type GetPostOnRampQuoteParams = { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### buyWithFiatStatus The "Buy with fiat" transaction status object returned by [getBuyWithFiatStatus](https://portal.thirdweb.com/typescript/v5/getBuyWithFiatStatus) function `type buyWithFiatStatus = [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## GetProfileParams Represents the parameters for the "getProfile" function. `type GetProfileParams = { profileId: AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; }; ` ##### profileId `type profileId = AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; ` ## GetProfileIdByHandleHashParams Represents the parameters for the "getProfileIdByHandleHash" function. `type GetProfileIdByHandleHashParams = { handleHash: AbiParameterToPrimitiveType<{ name: "handleHash"; type: "bytes32"; }>; }; ` ##### handleHash `type handleHash = AbiParameterToPrimitiveType<{ name: "handleHash"; type: "bytes32"; }>; ` ## GetProfileMetadataParams `type GetProfileMetadataParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHubAddress?: string }; profileId: bigint; }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### overrides `type overrides = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHubAddress?: string }; ` ##### profileId `type profileId = bigint; ` ## GetPublicationParams Represents the parameters for the "getPublication" function. `type GetPublicationParams = { profileId: AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; pubId: AbiParameterToPrimitiveType<{ name: "pubId"; type: "uint256"; }>; }; ` ##### profileId `type profileId = AbiParameterToPrimitiveType<{ name: "profileId"; type: "uint256"; }>; ` ##### pubId `type pubId = AbiParameterToPrimitiveType<{ name: "pubId"; type: "uint256"; }>; ` ## GetPublishedContractParams Represents the parameters for the "getPublishedContract" function. `type GetPublishedContractParams = { contractId: AbiParameterToPrimitiveType<{ name: "contractId"; type: "string"; }>; publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; }; ` ##### contractId `type contractId = AbiParameterToPrimitiveType<{ name: "contractId"; type: "string"; }>; ` ##### publisher `type publisher = AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; ` ## GetPublishedUriFromCompilerUriParams Represents the parameters for the "getPublishedUriFromCompilerUri" function. `type GetPublishedUriFromCompilerUriParams = { compilerMetadataUri: AbiParameterToPrimitiveType<{ name: "compilerMetadataUri"; type: "string"; }>; }; ` ##### compilerMetadataUri `type compilerMetadataUri = AbiParameterToPrimitiveType<{ name: "compilerMetadataUri"; type: "string"; }>; ` ## GetPublisherProfileUriParams Represents the parameters for the "getPublisherProfileUri" function. `type GetPublisherProfileUriParams = { publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; }; ` ##### publisher `type publisher = AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; ` ## GetRoleMemberCountParams `type GetRoleMemberCountParams = { role: RoleInput }; ` ##### role `type role = RoleInput; ` ## GetRoleMemberParams `type GetRoleMemberParams = { index: bigint; role: RoleInput }; ` ##### index `type index = bigint; ` ##### role `type role = RoleInput; ` ## GetRoleAdminParams `type GetRoleAdminParams = { role: RoleInput }; ` ##### role `type role = RoleInput; ` ## GetRoyaltyInfoForTokenParams Represents the parameters for the "getRoyaltyInfoForToken" function. `type GetRoyaltyInfoForTokenParams = { tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## GetRoyaltyInfoForTokenParams Represents the parameters for the "getRoyaltyInfoForToken" function. `type GetRoyaltyInfoForTokenParams = { tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## GetRoyaltyInfoForTokenParams Represents the parameters for the "getRoyaltyInfoForToken" function. `type GetRoyaltyInfoForTokenParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## GetTokenCountOfBundleParams Represents the parameters for the "getTokenCountOfBundle" function. `type GetTokenCountOfBundleParams = { bundleId: AbiParameterToPrimitiveType<{ name: "_bundleId"; type: "uint256"; }>; }; ` ##### bundleId `type bundleId = AbiParameterToPrimitiveType<{ name: "_bundleId"; type: "uint256"; }>; ` ## GetTokenIdParams Represents the parameters for the "getTokenId" function. `type GetTokenIdParams = { localName: AbiParameterToPrimitiveType<{ name: "localName"; type: "string"; }>; }; ` ##### localName `type localName = AbiParameterToPrimitiveType<{ name: "localName"; type: "string"; }>; ` ## GetStoragePriceParams `type GetStoragePriceParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; units?: bigint | number | string; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### units `type units = bigint | number | string; ` ## GetUniswapV3PoolParams Represents the parameters for the `findUniswapV3Pool` function. `type GetUniswapV3PoolParams = { tokenA: Address; tokenB: Address }; ` ##### tokenA `type tokenA = Address; ` ##### tokenB `type tokenB = Address; ` ## GetUniswapV3PoolResult `type GetUniswapV3PoolResult = { poolAddress: Address; poolFee: (typeof UniswapFee)[keyof typeof UniswapFee]; }; ` ##### poolAddress `type poolAddress = Address; ` ##### poolFee `type poolFee = (typeof UniswapFee)[keyof typeof UniswapFee]; ` ## GetUsdRegistrationPriceParams `type GetUsdRegistrationPriceParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number | string; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### extraStorage `type extraStorage = bigint | number | string; ` ## GetUsdStoragePriceParams `type GetUsdStoragePriceParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; units?: bigint | number | string; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### units `type units = bigint | number | string; ` ## GetUserResult `type GetUserResult = { createdAt: string; email?: string; phone?: string; profiles: Array<[Profile](https://portal.thirdweb.com/references/typescript/v5/Profile)>; userId: string; walletAddress: string; }; ` ##### createdAt `type createdAt = string; ` ##### email `type email = string; ` ##### phone `type phone = string; ` ##### profiles `type profiles = Array<[Profile](https://portal.thirdweb.com/references/typescript/v5/Profile)>; ` ##### userId `type userId = string; ` ##### walletAddress `type walletAddress = string; ` ## GetUserOpHashParams Represents the parameters for the "getUserOpHash" function. `type GetUserOpHashParams = { userOp: AbiParameterToPrimitiveType<{ components: [ { name: "sender"; type: "address" }, { name: "nonce"; type: "uint256" }, { name: "initCode"; type: "bytes" }, { name: "callData"; type: "bytes" }, { name: "callGasLimit"; type: "uint256" }, { name: "verificationGasLimit"; type: "uint256" }, { name: "preVerificationGas"; type: "uint256" }, { name: "maxFeePerGas"; type: "uint256" }, { name: "maxPriorityFeePerGas"; type: "uint256" }, { name: "paymasterAndData"; type: "bytes" }, { name: "signature"; type: "bytes" }, ]; name: "userOp"; type: "tuple"; }>; }; ` ##### userOp `type userOp = AbiParameterToPrimitiveType<{ components: [ { name: "sender"; type: "address" }, { name: "nonce"; type: "uint256" }, { name: "initCode"; type: "bytes" }, { name: "callData"; type: "bytes" }, { name: "callGasLimit"; type: "uint256" }, { name: "verificationGasLimit"; type: "uint256" }, { name: "preVerificationGas"; type: "uint256" }, { name: "maxFeePerGas"; type: "uint256" }, { name: "maxPriorityFeePerGas"; type: "uint256" }, { name: "paymasterAndData"; type: "bytes" }, { name: "signature"; type: "bytes" }, ]; name: "userOp"; type: "tuple"; }>; ` ## GetVotesParams Represents the parameters for the "getVotes" function. `type GetVotesParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; blockNumber: AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ##### blockNumber `type blockNumber = AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; ` ## GetVotesWithParamsParams Represents the parameters for the "getVotesWithParams" function. `type GetVotesWithParamsParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; blockNumber: AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; params: AbiParameterToPrimitiveType<{ name: "params"; type: "bytes"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ##### blockNumber `type blockNumber = AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; ` ##### params `type params = AbiParameterToPrimitiveType<{ name: "params"; type: "bytes"; }>; ` ## GetWalletBalanceOptions `type GetWalletBalanceOptions = { address: string; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); tokenAddress?: string; }; ` ##### address `type address = string; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### tokenAddress (Optional) The address of the token to retrieve the balance for. If not provided, the balance of the native token will be retrieved. `type tokenAddress = string; ` ## GrantMinterRoleParams `type GrantMinterRoleParams = { user: AbiParameterToPrimitiveType<{ internalType: "address"; name: "user"; type: "address"; }>; }; ` ##### user `type user = AbiParameterToPrimitiveType<{ internalType: "address"; name: "user"; type: "address"; }>; ` ## GrantRoleParams `type GrantRoleParams = { role: RoleInput; targetAccountAddress: Address; }; ` ##### role `type role = RoleInput; ` ##### targetAccountAddress `type targetAccountAddress = Address; ` ## GrantRolesParams Represents the parameters for the "grantRoles" function. `type GrantRolesParams = WithOverrides<{ roles: AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; user: AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; }>; ` ## HasAllRolesParams Represents the parameters for the "hasAllRoles" function. `type HasAllRolesParams = { roles: AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; user: AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; }; ` ##### roles `type roles = AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; ` ##### user `type user = AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; ` ## HasRoleParams `type HasRoleParams = { role: RoleInput; targetAccountAddress: string; }; ` ##### role `type role = RoleInput; ` ##### targetAccountAddress `type targetAccountAddress = string; ` ## HasAnyRoleParams Represents the parameters for the "hasAnyRole" function. `type HasAnyRoleParams = { roles: AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; user: AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; }; ` ##### roles `type roles = AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; ` ##### user `type user = AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; ` ## HasVotedParams Represents the parameters for the "hasVoted" function. `type HasVotedParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ##### proposalId `type proposalId = AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; ` ## HashProposalParams Represents the parameters for the "hashProposal" function. `type HashProposalParams = { calldatas: AbiParameterToPrimitiveType<{ name: "calldatas"; type: "bytes[]"; }>; descriptionHash: AbiParameterToPrimitiveType<{ name: "descriptionHash"; type: "bytes32"; }>; targets: AbiParameterToPrimitiveType<{ name: "targets"; type: "address[]"; }>; values: AbiParameterToPrimitiveType<{ name: "values"; type: "uint256[]"; }>; }; ` ##### calldatas `type calldatas = AbiParameterToPrimitiveType<{ name: "calldatas"; type: "bytes[]"; }>; ` ##### descriptionHash `type descriptionHash = AbiParameterToPrimitiveType<{ name: "descriptionHash"; type: "bytes32"; }>; ` ##### targets `type targets = AbiParameterToPrimitiveType<{ name: "targets"; type: "address[]"; }>; ` ##### values `type values = AbiParameterToPrimitiveType<{ name: "values"; type: "uint256[]"; }>; ` ## GetPublishedContractVersionsParams Represents the parameters for the "getPublishedContractVersions" function. `type GetPublishedContractVersionsParams = { contractId: AbiParameterToPrimitiveType<{ name: "contractId"; type: "string"; }>; publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; }; ` ##### contractId `type contractId = AbiParameterToPrimitiveType<{ name: "contractId"; type: "string"; }>; ` ##### publisher `type publisher = AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; ` ## GetRegistrationPriceParams `type GetRegistrationPriceParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number | string; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### extraStorage `type extraStorage = bigint | number | string; ` ## GetProfileIdAllowedToRecoverParams Represents the parameters for the "getProfileIdAllowedToRecover" function. `type GetProfileIdAllowedToRecoverParams = { followTokenId: AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; }; ` ##### followTokenId `type followTokenId = AbiParameterToPrimitiveType<{ name: "followTokenId"; type: "uint256"; }>; ` ## IdOfParams Represents the parameters for the "idOf" function. `type IdOfParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## InAppWalletAutoConnectOptions `type InAppWalletAutoConnectOptions = { authResult?: AuthStoredTokenWithCookieReturnType; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### authResult `type authResult = AuthStoredTokenWithCookieReturnType; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## InAppWalletConnectionOptions `type InAppWalletConnectionOptions = Prettify< ([MultiStepAuthArgsType](https://portal.thirdweb.com/references/typescript/v5/MultiStepAuthArgsType) | [SingleStepAuthArgsType](https://portal.thirdweb.com/references/typescript/v5/SingleStepAuthArgsType)) & { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } >; ` ## InAppWalletCreationOptions `type InAppWalletCreationOptions = | { auth?: { defaultSmsCountryCode?: SupportedSmsCountry; mode?: "popup" | "redirect" | "window"; options: Array<[InAppWalletAuth](https://portal.thirdweb.com/references/typescript/v5/InAppWalletAuth)>; passkeyDomain?: string; redirectUrl?: string; }; hidePrivateKeyExport?: boolean; metadata?: { image?: { alt?: string; height?: number; src: string; width?: number; }; }; partnerId?: string; smartAccount?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); storage?: [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage); } | undefined; ` ## InjectedConnectOptions `type InjectedConnectOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### chain Optional chain to connect to. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client The Thirdweb client. `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## Input `type Input = { account?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contextFilter?: { chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; contractAddresses?: Array; walletAddresses?: Array; }; sessionId?: string; } & ( | { messages: Array<{ content: string; role: "user" | "assistant"; }>; } | { message: string } ); ` ## InjectedSupportedWalletIds `type InjectedSupportedWalletIds = | "io.metamask" | "com.trustwallet.app" | "com.okex.wallet" | "me.rainbow" | "com.bybit" | "pro.tokenpocket" | "io.zerion.wallet" | "com.robinhood.wallet" | "com.crypto.wallet" | "io.magiceden.wallet" | "com.coinbase.wallet" | "app.backpack" | "app.phantom" | "com.roninchain.wallet" | "xyz.frontier.wallet" | "com.coin98" | "io.rabby" | "io.loopring.wallet" | "app.keplr" | "com.brave.wallet" | "com.coolbitx.cwsapp" | "com.bifrostwallet" | "so.onekey.app.wallet" | "xyz.ctrl" | "com.flowfoundation.wallet" | "app.subwallet" | "app.zeal" | "xyz.roam.wallet" | "com.meld.app" | "com.moongate.one" | "com.cryptokara" | "com.blanqlabs.wallet" | "tech.levain" | "com.enkrypt" | "com.scramble" | "com.fastex.wallet" | "com.dextrade" | "com.hashpack.wallet" | "com.mpcvault.broswerplugin" | "one.mixin.messenger" | "io.finoa" | "xyz.nestwallet" | "inc.tomo" | "me.komet.app" | "com.cryptnox" | "com.elrond.maiar.wallet" | "com.zypto" | "com.walletconnect.com" | "app.nightly" | "nl.greenhood.wallet" | "com.blazpay.wallet" | "com.companyname.swaptobe" | "io.getjoin.prd" | "xyz.talisman" | "co.family.wallet" | "eu.flashsoft.clear-wallet" | "app.berasig" | "com.lootrush" | "app.core.extension" | "xyz.dawnwallet" | "xyz.abs"; ` ## InstallPublishedModuleOptions `` type InstallPublishedModuleOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); constructorParams?: Record; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleName: string; nonce?: number; publisher?: string; version?: string; }; `` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### constructorParams `type constructorParams = Record; ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### moduleData `` type moduleData = `0x${string}`; `` ##### moduleName `type moduleName = string; ` ##### nonce `type nonce = number; ` ##### publisher `type publisher = string; ` ##### version `type version = string; ` ## IsAccountDeployedParams Represents the parameters for the "getAddress" function. `type IsAccountDeployedParams = { adminSigner: AbiParameterToPrimitiveType<{ name: "adminSigner"; type: "address"; }>; data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes" }>; }; ` ##### adminSigner `type adminSigner = AbiParameterToPrimitiveType<{ name: "adminSigner"; type: "address"; }>; ` ##### data `type data = AbiParameterToPrimitiveType<{ name: "data"; type: "bytes"; }>; ` ## IsApprovedForAllParams Represents the parameters for the "isApprovedForAll" function. `type IsApprovedForAllParams = { operator: AbiParameterToPrimitiveType<{ name: "operator"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### operator `type operator = AbiParameterToPrimitiveType<{ name: "operator"; type: "address"; }>; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## InstallModuleParams Represents the parameters for the "installModule" function. `type InstallModuleParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes" }>; moduleContract: AbiParameterToPrimitiveType<{ name: "moduleContract"; type: "address"; }>; }>; ` ## IsActiveSignerParams Represents the parameters for the "isActiveSigner" function. `type IsActiveSignerParams = { signer: AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; }; ` ##### signer `type signer = AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; ` ## IsApprovedForAllParams Represents the parameters for the "isApprovedForAll" function. `type IsApprovedForAllParams = { operator: AbiParameterToPrimitiveType<{ name: "_operator"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; }; ` ##### operator `type operator = AbiParameterToPrimitiveType<{ name: "_operator"; type: "address"; }>; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; ` ## IsBuyerApprovedForListingParams `type IsBuyerApprovedForListingParams = { buyer: Address; listingId: bigint; }; ` ##### buyer `type buyer = Address; ` ##### listingId `type listingId = bigint; ` ## IsClaimedParams Represents the parameters for the "isClaimed" function. `type IsClaimedParams = { receiver: AbiParameterToPrimitiveType<{ name: "_receiver"; type: "address"; }>; token: AbiParameterToPrimitiveType<{ name: "_token"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### receiver `type receiver = AbiParameterToPrimitiveType<{ name: "_receiver"; type: "address"; }>; ` ##### token `type token = AbiParameterToPrimitiveType<{ name: "_token"; type: "address"; }>; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## IsErc20CurrencyRegisteredParams Represents the parameters for the "isErc20CurrencyRegistered" function. `type IsErc20CurrencyRegisteredParams = { currencyAddress: AbiParameterToPrimitiveType<{ name: "currencyAddress"; type: "address"; }>; }; ` ##### currencyAddress `type currencyAddress = AbiParameterToPrimitiveType<{ name: "currencyAddress"; type: "address"; }>; ` ## IsModuleRegisteredAsParams Represents the parameters for the "isModuleRegisteredAs" function. `type IsModuleRegisteredAsParams = { moduleAddress: AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; moduleType: AbiParameterToPrimitiveType<{ name: "moduleType"; type: "uint256"; }>; }; ` ##### moduleAddress `type moduleAddress = AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; ` ##### moduleType `type moduleType = AbiParameterToPrimitiveType<{ name: "moduleType"; type: "uint256"; }>; ` ## IsModuleRegisteredParams Represents the parameters for the "isModuleRegistered" function. `type IsModuleRegisteredParams = { moduleAddress: AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; }; ` ##### moduleAddress `type moduleAddress = AbiParameterToPrimitiveType<{ name: "moduleAddress"; type: "address"; }>; ` ## IsNewWinningBidParams Represents the parameters for the "isNewWinningBid" function. `type IsNewWinningBidParams = { auctionId: AbiParameterToPrimitiveType<{ name: "_auctionId"; type: "uint256"; }>; bidAmount: AbiParameterToPrimitiveType<{ name: "_bidAmount"; type: "uint256"; }>; }; ` ##### auctionId `type auctionId = AbiParameterToPrimitiveType<{ name: "_auctionId"; type: "uint256"; }>; ` ##### bidAmount `type bidAmount = AbiParameterToPrimitiveType<{ name: "_bidAmount"; type: "uint256"; }>; ` ## IsFollowingParams Represents the parameters for the "isFollowing" function. `type IsFollowingParams = { followerProfileId: AbiParameterToPrimitiveType<{ name: "followerProfileId"; type: "uint256"; }>; }; ` ##### followerProfileId `type followerProfileId = AbiParameterToPrimitiveType<{ name: "followerProfileId"; type: "uint256"; }>; ` ## IsTransferEnabledForParams Represents the parameters for the "isTransferEnabledFor" function. `type IsTransferEnabledForParams = { target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }; ` ##### target `type target = AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; ` ## IsTransferEnabledForParams Represents the parameters for the "isTransferEnabledFor" function. `type IsTransferEnabledForParams = { target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }; ` ##### target `type target = AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; ` ## IsTransferEnabledForParams Represents the parameters for the "isTransferEnabledFor" function. `type IsTransferEnabledForParams = { target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }; ` ##### target `type target = AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; ` ## JWTPayload `type JWTPayload = { aud: string; ctx?: Tctx; exp: number; iat: number; iss: string; jti: string; nbf: number; sub: string; }; ` ##### aud `type aud = string; ` ##### ctx `type ctx = Tctx; ` ##### exp `type exp = number; ` ##### iat `type iat = number; ` ##### iss `type iss = string; ` ##### jti `type jti = string; ` ##### nbf `type nbf = number; ` ##### sub `type sub = string; ` ## JWTPayloadInput `type JWTPayloadInput = { aud: string; ctx?: Tctx; exp: Date; iat: Date; iss: string; jti?: string; nbf: Date; sub: string; }; ` ##### aud `type aud = string; ` ##### ctx `type ctx = Tctx; ` ##### exp `type exp = Date; ` ##### iat `type iat = Date; ` ##### iss `type iss = string; ` ##### jti `type jti = string; ` ##### nbf `type nbf = Date; ` ##### sub `type sub = string; ` ## IsCurrencyApprovedForListingParams Represents the parameters for the "isCurrencyApprovedForListing" function. `type IsCurrencyApprovedForListingParams = { currency: AbiParameterToPrimitiveType<{ name: "_currency"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ name: "_listingId"; type: "uint256"; }>; }; ` ##### currency `type currency = AbiParameterToPrimitiveType<{ name: "_currency"; type: "address"; }>; ` ##### listingId `type listingId = AbiParameterToPrimitiveType<{ name: "_listingId"; type: "uint256"; }>; ` ## LazyMintParams `type LazyMintParams = { nfts: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string> }; ` ##### nfts `type nfts = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; ` ## LazyMintParams `type LazyMintParams = { nfts: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string> }; ` ##### nfts `type nfts = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; ` ## LensProfileSchema `type LensProfileSchema = { lens: { appId?: string; attributes: Array; bio: string; coverPicture: string; id: string; name: string; picture: string; }; signature: string; }; ` ##### lens `type lens = { appId?: string; attributes: Array; bio: string; coverPicture: string; id: string; name: string; picture: string; }; ` ##### signature `type signature = string; ` ## LensProfile `type LensProfile = { bio?: string; coverPicture?: string; name?: string; picture?: string; }; ` ##### bio `type bio = string; ` ##### coverPicture `type coverPicture = string; ` ##### name `type name = string; ` ##### picture `type picture = string; ` ## LocaleId `type LocaleId = | "en_US" | "es_ES" | "ja_JP" | "ko_KR" | "tl_PH" | "vi_VN" | "de_DE" | "fr_FR" | "pt_BR"; ` ## LoginPayload `type LoginPayload = { address: string; chain_id?: string; domain: string; expiration_time: string; invalid_before: string; issued_at: string; nonce: string; resources?: Array; statement: string; uri?: string; version: string; }; ` ##### address `type address = string; ` ##### chain\_id `type chain_id = string; ` ##### domain `type domain = string; ` ##### expiration\_time `type expiration_time = string; ` ##### invalid\_before `type invalid_before = string; ` ##### issued\_at `type issued_at = string; ` ##### nonce `type nonce = string; ` ##### resources `type resources = Array; ` ##### statement `type statement = string; ` ##### uri `type uri = string; ` ##### version `type version = string; ` ## MarketplaceContractParams `type MarketplaceContractParams = { contractURI?: string; defaultAdmin?: Address; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; platformFeeBps?: number; platformFeeRecipient?: string; social_urls?: Record; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = Address; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### platformFeeBps `type platformFeeBps = number; ` ##### platformFeeRecipient `type platformFeeRecipient = string; ` ##### social\_urls `type social_urls = Record; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## MakeOfferParams `type MakeOfferParams = { assetContractAddress: Address; currencyContractAddress: Address; offerExpiresAt: Date; quantity?: bigint; tokenId: bigint; } & ({ totalOfferWei: bigint } | { totalOffer: string }); ` ## MaxDepositParams Represents the parameters for the "maxDeposit" function. `type MaxDepositParams = { receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; }; ` ##### receiver `type receiver = AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; ` ## MaxMintParams Represents the parameters for the "maxMint" function. `type MaxMintParams = { receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; }; ` ##### receiver `type receiver = AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; ` ## MaxRedeemParams Represents the parameters for the "maxRedeem" function. `type MaxRedeemParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## MediaRenderer ##### Signature `function MediaRenderer( props: [MediaRendererProps](https://portal.thirdweb.com/references/typescript/v5/MediaRendererProps) & RefAttributes, ): ReactNode; ` ### Parameters ##### props Refer to [MediaRendererProps](https://portal.thirdweb.com/references/typescript/v5/MediaRendererProps) to see the available props. #### Type `let props: [MediaRendererProps](https://portal.thirdweb.com/references/typescript/v5/MediaRendererProps) & RefAttributes; ` ### Returns ##### Return Type `let returnType: ReactNode; ` ## MaxWithdrawParams Represents the parameters for the "maxWithdraw" function. `type MaxWithdrawParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## MediaRendererProps Props taken by the for the [MediaRenderer](https://portal.thirdweb.com/references/typescript/v5/MediaRenderer) component `type MediaRendererProps = { alt?: string; className?: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); controls?: HTMLVideoElement["controls"]; gatewayUrl?: string; height?: string; mimeType?: string; poster?: string | null; requireInteraction?: boolean; src?: string | null; style?: React.CSSProperties; width?: string; }; ` ##### alt The [ alt](https://www.w3schools.com/tags/att%5Fimg%5Falt.asp) attributes provides alternative information for the media, if a user for some reason cannot view it due to slow connection, an error in the `src` attribute, or if the user is visually impaired. The default value is `""` . `type alt = string; ` ##### className The className to apply on the rendered element to add custom styling. `type className = string; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### controls Show the media controls (where applicable) By default it is set to `false` `type controls = HTMLVideoElement["controls"]; ` ##### gatewayUrl The IPFS gateway URL to use `type gatewayUrl = string; ` ##### height The height of the rendered media. The default value is `auto` . `type height = string; ` ##### mimeType Provide the [ MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics%5Fof%5FHTTP/MIME%5Ftypes) of the media if it is known `type mimeType = string; ` ##### poster The [ poster](https://www.w3schools.com/tags/att%5Fvideo%5Fposter.asp) is the image that is shown before the video is played. The default value is the first frame of the video. If the `src` is not a video, this prop is ignored. `type poster = string | null; ` ##### requireInteraction Require user interaction to play the media (i.e. disable autoplay). The default value is `false` . `type requireInteraction = boolean; ` ##### src the `src` attribute specifies the URL of the media. This can be an IPFS URI or HTTP URL that points to media `type src = string | null; ` ##### style The style to apply on the rendered element to add custom styling. `type style = React.CSSProperties; ` ##### width The width of the rendered media. The default value is `auto` . `type width = string; ` ## MintAdditionalSupplyToParams `type MintAdditionalSupplyToParams = { supply: bigint; to: string; tokenId: bigint; }; ` ##### supply `type supply = bigint; ` ##### to `type to = string; ` ##### tokenId `type tokenId = bigint; ` ## MintTimestampOfFollowNFTParams Represents the parameters for the "mintTimestampOf" function. `type MintTimestampOfFollowNFTParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## MintParams Represents the parameters for the "mint" function. `type MintParams = WithOverrides<{ receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; shares: AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; }>; ` ## MintTimestampOfParams Represents the parameters for the "mintTimestampOf" function. `type MintTimestampOfParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## MintToBatchParams `type MintToBatchParams = WithOverrides<{ nfts: Array<{ metadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; supply: bigint }>; to: string; }>; ` ## MintToParams `type MintToParams = WithOverrides<{ nft: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string; supply: bigint; to: string; }>; ` ## MintToParams Represents the parameters for the `mintTo` function. `type MintToParams = Prettify< WithOverrides< { to: string } & ( | { amount: number | string } | { amountWei: bigint } ) > >; ` ## ModuleInstallData `type ModuleInstallData = { data: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); module: [Address](https://portal.thirdweb.com/references/typescript/v5/Address) }; ` ##### data `type data = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### module `type module = [Address](https://portal.thirdweb.com/references/typescript/v5/Address); ` ## ModularContractParams `type ModularContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; social_urls?: Record; symbol?: string; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### social\_urls `type social_urls = Record; ` ##### symbol `type symbol = string; ` ## ModuleInstaller `type ModuleInstaller = (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<[ModuleInstallData](https://portal.thirdweb.com/references/typescript/v5/ModuleInstallData)>; ` ## NFT `type NFT = | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` ## MulticallParams Represents the parameters for the "multicall" function. `type MulticallParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes[]"; }>; }>; ` ## NFTInput Represents the input data for creating an NFT (Non-Fungible Token). `type NFTInput = Prettify< { animation_url?: FileOrBufferOrString; background_color?: string; description?: string; external_url?: FileOrBufferOrString; image?: FileOrBufferOrString; name?: string; properties?: | Record | Array>; } & Record >; ` ## NFTMedia This component fetches and displays an NFT's media. It uses thirdweb [MediaRenderer](https://portal.thirdweb.com/refernces/typescript/v5/MediaRenderer) under the hood so you can style it just like how you would style a MediaRenderer. ### Example #### Basic usage `import { NFTProvider, NFTMedia } from "thirdweb/react"; ; ` #### Show a loading sign while the media is being fetched `import { NFTProvider, NFTMedia } from "thirdweb/react"; } /> ; ` #### Show something in case the media failed to resolve `import { NFTProvider, NFTMedia } from "thirdweb/react"; Failed to load media} /> ; ` #### Custom query options for useQuery (tanstack-query) `import { NFTProvider, NFTMedia } from "thirdweb/react"; ; ` #### Basic stylings You can style NFTMedia with the `style` and `className` props. `; ` #### Override the media with the `mediaResolver` prop If you already have the url, you can skip the network requests and pass it directly to the NFTMedia `; ` You can also pass in your own custom (async) function that retrieves the media url `const getMedia = async () => { const url = getNFTMedia(props); return url; }; ; ` ##### Signature `function NFTMedia(__namedParameters: [NFTMediaProps](https://portal.thirdweb.com/references/typescript/v5/NFTMediaProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: Omit< [MediaRendererProps](https://portal.thirdweb.com/references/typescript/v5/MediaRendererProps), "src" | "poster" | "client" > & { fallbackComponent?: JSX.Element; loadingComponent?: JSX.Element; mediaResolver?: | [NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo) | (() => [NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)) | (() => Promise<[NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)>); queryOptions?: Omit< UseQueryOptions<[NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)>, "queryFn" | "queryKey" >; }; ` ### Returns ##### Return Type `let returnType: null | Element; ` A MediaRenderer component ## NFTMediaInfo `type NFTMediaInfo = { poster: string | undefined; src: string }; ` ##### poster `type poster = string | undefined; ` ##### src `type src = string; ` ## NFTMintParams `type NFTMintParams = { nfts: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; to: string }; ` ##### nfts `type nfts = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; ` ##### to `type to = string; ` ## NFTMediaProps `type NFTMediaProps = Omit< [MediaRendererProps](https://portal.thirdweb.com/references/typescript/v5/MediaRendererProps), "src" | "poster" | "client" > & { fallbackComponent?: JSX.Element; loadingComponent?: JSX.Element; mediaResolver?: | [NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo) | (() => [NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)) | (() => Promise<[NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)>); queryOptions?: Omit< UseQueryOptions<[NFTMediaInfo](https://portal.thirdweb.com/references/typescript/v5/NFTMediaInfo)>, "queryFn" | "queryKey" >; }; ` ## NFTMetadata `type NFTMetadata = { animation_url?: string; attributes?: Record; background_color?: string; description?: string; external_url?: string; image?: string; image_url?: string; name?: string; properties?: Record; uri: string; } & Record; ` ## NFTProviderProps Props for the `` component `type NFTProviderProps = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); tokenId: bigint; }; ` ##### contract The NFT contract address. Accepts both ERC721 and ERC1155 contracts `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### tokenId The tokenId whose info you want to display `type tokenId = bigint; ` ## NFTProvider A React context provider component that supplies NFT-related data to its child components. This component serves as a wrapper around the `NFTProviderContext.Provider` and passes the provided NFT data down to all of its child components through the context API. ### Example `import { getContract } from "thirdweb"; import { NFTProvider, NFTMedia, NFTDescription, NFTName, } from "thirdweb/react"; const contract = getContract({ address: "0x...", chain: ethereum, client: yourThirdwebClient, }); ; ` ##### Signature `function NFTProvider( props: PropsWithChildren<[NFTProviderProps](https://portal.thirdweb.com/references/typescript/v5/NFTProviderProps)>, ): Element; ` ### Parameters ##### props The props for the NFT provider #### Type `let props: PropsWithChildren<[NFTProviderProps](https://portal.thirdweb.com/references/typescript/v5/NFTProviderProps)>; ` ### Returns ##### Return Type `let returnType: Element; ` ## NamehashParams Represents the parameters for the "namehash" function. `type NamehashParams = { labels: AbiParameterToPrimitiveType<{ name: "labels"; type: "string[]"; }>; }; ` ##### labels `type labels = AbiParameterToPrimitiveType<{ name: "labels"; type: "string[]"; }>; ` ## NewAuctionEventFilters Represents the filters for the "NewAuction" event. `type NewAuctionEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; auctionCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionCreator"; type: "address"; }>; auctionId: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionId"; type: "uint256"; }>; }>; ` ## NetworkSelectorProps `type NetworkSelectorProps = { onCustomClick?: () => void; onSwitch?: (chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)) => void; popularChainIds?: Array; recentChainIds?: Array; renderChain?: React.FC; sections?: Array; }; ` ##### onCustomClick ##### Signature `function onCustomClick(): void; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onSwitch ##### Signature `function onSwitch(chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)): void; ` ##### Parameters ##### chain The `Chain` of the chain that was switched to ###### Type `let chain: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### Returns ##### Return Type `let returnType: void; ` ##### popularChainIds Deprecated Use `sections` prop instead If `sections` prop is provided, this prop will be ignored Chains to be displayed as "Popular" `type popularChainIds = Array; ` ##### recentChainIds Deprecated Use `sections` prop instead If `sections` prop is provided, this prop will be ignored Chains to be displayed as "Recent" `type recentChainIds = Array; ` ##### renderChain Override how the chain button is rendered in the Modal `type renderChain = React.FC; ` ##### sections Specify sections of chains to be displayed in the Network Selector Modal `type sections = Array; ` ### Example To display "Polygon", "Avalanche" chains under "Recently used" section and "Ethereum", "Arbitrum" chains under "Popular" section, you can set the prop with the following value `import { arbitrum, base, ethereum, polygon } from "thirdweb/chains"; const sections = [ { label: "Recently used", chains: [arbitrum, polygon] }, { label: "Popular", chains: [base, ethereum] }, ]; ` ## NewBidEventFilters Represents the filters for the "NewBid" event. `type NewBidEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; auctionId: AbiParameterToPrimitiveType<{ indexed: true; name: "auctionId"; type: "uint256"; }>; bidder: AbiParameterToPrimitiveType<{ indexed: true; name: "bidder"; type: "address"; }>; }>; ` ## NewListingEventFilters Represents the filters for the "NewListing" event. `type NewListingEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; listingCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "listingCreator"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## NewOfferEventFilters Represents the filters for the "NewOffer" event. `type NewOfferEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; offerId: AbiParameterToPrimitiveType<{ indexed: true; name: "offerId"; type: "uint256"; }>; offeror: AbiParameterToPrimitiveType<{ indexed: true; name: "offeror"; type: "address"; }>; }>; ` ## NewSaleEventFilters Represents the filters for the "NewSale" event. `type NewSaleEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; listingCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "listingCreator"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## NoncesParams Represents the parameters for the "nonces" function. `type NoncesParams = { signer: AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; }; ` ##### signer `type signer = AbiParameterToPrimitiveType<{ name: "signer"; type: "address"; }>; ` ## OpenPackParams Represents the parameters for the "openPack" function. `type OpenPackParams = WithOverrides<{ amountToOpen: AbiParameterToPrimitiveType<{ name: "amountToOpen"; type: "uint256"; }>; packId: AbiParameterToPrimitiveType<{ name: "packId"; type: "uint256"; }>; }>; ` ## OpenPackParams Represents the parameters for the "openPack" function. `type OpenPackParams = WithOverrides<{ amountToOpen: AbiParameterToPrimitiveType<{ name: "amountToOpen"; type: "uint256"; }>; packId: AbiParameterToPrimitiveType<{ name: "packId"; type: "uint256"; }>; }>; ` ## Offer `type Offer = { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; currencyContractAddress: Address; currencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; offerorAddress: Address; quantity: bigint; status: ListingStatus; tokenId: bigint; totalPrice: bigint; }; ` ##### asset `type asset = [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); ` ##### assetContractAddress `type assetContractAddress = Address; ` ##### currencyContractAddress `type currencyContractAddress = Address; ` ##### currencyValue `type currencyValue = [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); ` ##### endTimeInSeconds `type endTimeInSeconds = bigint; ` ##### id `type id = bigint; ` ##### offerorAddress `type offerorAddress = Address; ` ##### quantity `type quantity = bigint; ` ##### status `type status = ListingStatus; ` ##### tokenId `type tokenId = bigint; ` ##### totalPrice `type totalPrice = bigint; ` ## OpenZeppelinOptions `type OpenZeppelinOptions = { domainName?: string; domainSeparatorVersion?: string; domainVersion?: string; experimentalChainlessSupport?: boolean; provider: "openzeppelin"; relayerForwarderAddress: Address; relayerUrl: string; }; ` ##### domainName `type domainName = string; ` ##### domainSeparatorVersion `type domainSeparatorVersion = string; ` ##### domainVersion `type domainVersion = string; ` ##### experimentalChainlessSupport `type experimentalChainlessSupport = boolean; ` ##### provider `type provider = "openzeppelin"; ` ##### relayerForwarderAddress `type relayerForwarderAddress = Address; ` ##### relayerUrl `type relayerUrl = string; ` ## Output `type Output = { message: string; sessionId: string; transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }; ` ##### message `type message = string; ` ##### sessionId `type sessionId = string; ` ##### transactions `type transactions = Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; ` ## OwnerUpdatedEventFilters Represents the filters for the "OwnerUpdated" event. `type OwnerUpdatedEventFilters = Partial<{ newOwner: AbiParameterToPrimitiveType<{ indexed: true; name: "newOwner"; type: "address"; }>; prevOwner: AbiParameterToPrimitiveType<{ indexed: true; name: "prevOwner"; type: "address"; }>; }>; ` ## OwnershipHandoverExpiresAtParams Represents the parameters for the "ownershipHandoverExpiresAt" function. `type OwnershipHandoverExpiresAtParams = { pendingOwner: AbiParameterToPrimitiveType<{ name: "pendingOwner"; type: "address"; }>; }; ` ##### pendingOwner `type pendingOwner = AbiParameterToPrimitiveType<{ name: "pendingOwner"; type: "address"; }>; ` ## PACK\_TOKEN\_TYPE `enum PACK_TOKEN_TYPE { ERC1155, ERC20, ERC721, } ` #### ERC1155 `2; ` #### ERC20 `0; ` #### ERC721 `1; ` ## PackContractParams `type PackContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; royaltyBps?: number | string; royaltyRecipient?: string; social_urls?: Record; symbol?: string; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin Defaults to the deployer's address `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name Name of the Pack contract `type name = string; ` ##### royaltyBps Defaults to 0 (zero) `type royaltyBps = number | string; ` ##### royaltyRecipient Defaults to the deployer's address `type royaltyRecipient = string; ` ##### social\_urls `type social_urls = Record; ` ##### symbol Defaults to an empty string ("") `type symbol = string; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## PackCreatedEventFilters Represents the filters for the "PackCreated" event. `type PackCreatedEventFilters = Partial<{ packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## PackCreatedEventFilters Represents the filters for the "PackCreated" event. `type PackCreatedEventFilters = Partial<{ packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## PackOpenedEventFilters Represents the filters for the "PackOpened" event. `type PackOpenedEventFilters = Partial<{ opener: AbiParameterToPrimitiveType<{ indexed: true; name: "opener"; type: "address"; }>; packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## PackUpdatedEventFilters Represents the filters for the "PackUpdated" event. `type PackUpdatedEventFilters = Partial<{ packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## PackOpenedEventFilters Represents the filters for the "PackOpened" event. `type PackOpenedEventFilters = Partial<{ opener: AbiParameterToPrimitiveType<{ indexed: true; name: "opener"; type: "address"; }>; packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## PackUpdatedEventFilters Represents the filters for the "PackUpdated" event. `type PackUpdatedEventFilters = Partial<{ packId: AbiParameterToPrimitiveType<{ indexed: true; name: "packId"; type: "uint256"; }>; }>; ` ## ParseEventLogsOptions `type ParseEventLogsOptions< abiEvents extends Array<[PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>, TStrict extends boolean, > = { events: abiEvents; logs: Array; strict?: TStrict; }; ` ##### events `type events = abiEvents; ` ##### logs `type logs = Array; ` ##### strict `type strict = TStrict; ` ## ParseAvatarOptions `type ParseAvatarOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### uri `type uri = string; ` ## ParseEventLogsResult `type ParseEventLogsResult< abiEvents extends Array<[PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>, TStrict extends boolean, abiEvent extends AbiEvent = abiEvents[number]["abiEvent"], > = Array< Log> >; ` ## OwnerOfParams Represents the parameters for the "ownerOf" function. `type OwnerOfParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## PayEmbedConnectOptions Connection options for the `PayEmbed` component `type PayEmbedConnectOptions = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); autoConnect?: { timeout: number } | boolean; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; connectModal?: [ConnectButton_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions); recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; showAllWallets?: boolean; walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ### Example `; ` ##### accountAbstraction Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options. This allows to sponsor gas fees for your user's transaction using the thirdweb account abstraction infrastructure. `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### appMetadata Metadata of the app that will be passed to connected wallet. Setting this is highly recommended. `type appMetadata = AppMetadata; ` ##### auth Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to enforce the users to sign a message after connecting their wallet to authenticate themselves. Refer to the [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details `type auth = [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); ` ##### autoConnect When the user has connected their wallet to your site, this configuration determines whether or not you want to automatically connect to the last connected wallet when user visits your site again in the future. By default it is set to `{ timeout: 15000 }` meaning that autoConnect is enabled and if the autoConnection does not succeed within 15 seconds, it will be cancelled. If you want to disable autoConnect, set this prop to `false` . If you want to customize the timeout, you can assign an object with a `timeout` key to this prop. `type autoConnect = { timeout: number } | boolean; ` ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet. If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it. This ensures that the wallet is connected to the correct blockchain before interacting with your app. The `ConnectButton` also shows a "Switch Network" button until the wallet is connected to the specified chain. Clicking on the "Switch Network" button triggers the wallet to switch to the specified chain. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### chains Array of chains that your app supports. This is only relevant if your app is a multi-chain app and works across multiple blockchains. If your app only works on a single blockchain, you should only specify the `chain` prop. Given list of chains will used in various ways: * They will be displayed in the network selector in the `ConnectButton` 's details modal post connection * They will be sent to wallet at the time of connection if the wallet supports requesting multiple chains ( example: WalletConnect ) so that users can switch between the chains post connection easily You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `import { defineChain } from "thirdweb/react"; const polygon = defineChain({ id: 137, }); ` `type chains = Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; ` ##### connectModal Configurations for the `ConnectButton` 's Modal that is shown for connecting a wallet Refer to the [ConnectButton\_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions) type for more details `type connectModal = [ConnectButton_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions); ` ##### recommendedWallets Wallets to show as recommended in the `ConnectButton` 's Modal `type recommendedWallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ##### showAllWallets By default, ConnectButton modal shows a "All Wallets" button that shows a list of 500+ wallets. You can disable this button by setting `showAllWallets` prop to `false` `type showAllWallets = boolean; ` ##### walletConnect Configure options for WalletConnect By default WalletConnect uses the thirdweb's default project id. Setting your own project id is recommended. You can create a project id by signing up on [ walletconnect.com](https://walletconnect.com/) `type walletConnect = { projectId?: string }; ` ##### wallets Array of wallets to show in Connect Modal. If not provided, default wallets will be used. `type wallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ## PayEmbedProps Props of [PayEmbed](https://portal.thirdweb.com/references/typescript/v5/PayEmbed) component `type PayEmbedProps = { activeWallet?: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); className?: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectOptions?: [PayEmbedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions); hiddenWallets?: Array<[WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)>; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); payOptions?: [PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions); style?: React.CSSProperties; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); theme?: "light" | "dark" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); }; ` ##### activeWallet The wallet that should be pre-selected in the PayEmbed UI. `type activeWallet = [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ##### className `type className = string; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### connectOptions Customize the options for "Connect" Button showing in the PayEmbed UI when the user is not connected to a wallet. Refer to the [PayEmbedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details. `type connectOptions = [PayEmbedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions); ` ##### hiddenWallets All wallet IDs included in this array will be hidden from wallet selection when connected. `type hiddenWallets = Array<[WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)>; ` ##### locale By default - ConnectButton UI uses the `en-US` locale for english language users. You can customize the language used in the ConnectButton UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### payOptions Customize the Pay UI options. Refer to the [PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions) type for more details. `type payOptions = [PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions); ` ##### style `type style = React.CSSProperties; ` ##### supportedTokens Override the default tokens shown in PayEmbed UI By default, PayEmbed shows a few popular tokens for Pay supported chains `type supportedTokens = [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); ` ### Example `supportedTokens` prop allows you to override this list as shown below. `import { PayEmbed } from "thirdweb/react"; import { NATIVE_TOKEN_ADDRESS } from "thirdweb"; function Example() { return ( ); } ` ##### theme Set the theme for the `PayEmbed` component. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = "light" | "dark" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); function Example() { return ; } ` ## PayTokenInfo `type PayTokenInfo = { chainId: number; decimals: number; name?: string; priceUSDCents: number; symbol?: string; tokenAddress: string; }; ` ##### chainId `type chainId = number; ` ##### decimals `type decimals = number; ` ##### name `type name = string; ` ##### priceUSDCents `type priceUSDCents = number; ` ##### symbol `type symbol = string; ` ##### tokenAddress `type tokenAddress = string; ` ## PayOnChainTransactionDetails `type PayOnChainTransactionDetails = { amount: string; amountUSDCents: number; amountWei: string; completedAt?: string; explorerLink?: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); transactionHash: string; }; ` ##### amount `type amount = string; ` ##### amountUSDCents `type amountUSDCents = number; ` ##### amountWei `type amountWei = string; ` ##### completedAt `type completedAt = string; ` ##### explorerLink `type explorerLink = string; ` ##### token `type token = [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); ` ##### transactionHash `type transactionHash = string; ` ## PayUIOptions `type PayUIOptions = Prettify< { buyWithCrypto?: | false | { prefillSource?: { allowEdits?: { chain: boolean; token: boolean }; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); token?: [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); }; testMode?: boolean; }; buyWithFiat?: | { preferredProvider?: FiatProvider; prefillSource?: { currency?: CurrencyMeta["shorthand"] }; testMode?: boolean; } | false; metadata?: { image?: string; name?: string }; onPurchaseSuccess?: ( info: | { status: [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus); type: "crypto" } | { status: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); type: "fiat" } | { chainId: number; transactionHash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); type: "transaction"; }, ) => void; purchaseData?: object; } & ([FundWalletOptions](https://portal.thirdweb.com/references/typescript/v5/FundWalletOptions) | [DirectPaymentOptions](https://portal.thirdweb.com/references/typescript/v5/DirectPaymentOptions) | [TranasctionOptions](https://portal.thirdweb.com/references/typescript/v5/TranasctionOptions)) >; ` ## PayeeParams Represents the parameters for the "payee" function. `type PayeeParams = { index: AbiParameterToPrimitiveType<{ name: "index"; type: "uint256"; }>; }; ` ##### index `type index = AbiParameterToPrimitiveType<{ name: "index"; type: "uint256"; }>; ` ## PaymasterResult `type PaymasterResult = { callGasLimit?: bigint; preVerificationGas?: bigint; verificationGasLimit?: bigint; } & ( | { paymasterAndData: string } | { paymaster: string; paymasterData: string; paymasterPostOpGasLimit?: bigint; paymasterVerificationGasLimit?: bigint; } ); ` ## PrepareCallOptions `type PrepareCallOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } & PromisedObject; ` ## PaymentInfo `type PaymentInfo = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); sellerAddress: string; token?: [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); } & ({ amount: string } | { amountWei: bigint }); ` ## PrepareContractCallOptions `type PrepareContractCallOptions< TAbi extends Abi = [], TMethod extends | AbiFunction | string | (( contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), ) => Promise) = TAbi extends { length: 0 } ? AbiFunction | string : ExtractAbiFunctionNames, TPreparedMethod extends PreparedMethod< ParseMethod > = PreparedMethod>, > = [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< Omit< TransactionRequest, | "from" | "to" | "data" | "value" | "accessList" | "gas" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "nonce" > & { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); method: TMethod | TPreparedMethod; } & ParamsOption & Omit< [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions), "to" | "data" | "chain" | "client" >, TAbi >; ` ## PrepareDirectDeployTransactionOptions `type PrepareDirectDeployTransactionOptions = Prettify< ClientAndChain & { abi: Abi; bytecode: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); constructorParams?: Record; } >; ` ## PrepareEventOptions `` type PrepareEventOptions< TSignature extends `event ${string}` | AbiEvent, > = { filters?: Readonly>>; signature: TSignature; }; `` ##### filters `type filters = Readonly>>; ` ##### signature `type signature = TSignature; ` ## PrepareTransactionOptions `type PrepareTransactionOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } & PromisedObject< Omit >; ` ## PreparedEvent `type PreparedEvent = { abiEvent: abiEvent; hash: Hex; topics: Array; }; ` ##### abiEvent `type abiEvent = abiEvent; ` ##### hash `type hash = Hex; ` ##### topics `type topics = Array; ` ## PreparedSendCall `type PreparedSendCall< abi extends Abi = [], abiFunction extends AbiFunction = AbiFunction, > = [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ## PreviewDepositParams Represents the parameters for the "previewDeposit" function. `type PreviewDepositParams = { assets: AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; }; ` ##### assets `type assets = AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; ` ## PreparedTransaction `type PreparedTransaction< abi extends Abi = [], abiFn extends AbiFunction = AbiFunction, options extends [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) = [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions), > = Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` ## PreviewMintParams Represents the parameters for the "previewMint" function. `type PreviewMintParams = { shares: AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; }; ` ##### shares `type shares = AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; ` ## PreviewRedeemParams Represents the parameters for the "previewRedeem" function. `type PreviewRedeemParams = { shares: AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; }; ` ##### shares `type shares = AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; ` ## PriceParams Represents the parameters for the "price" function. `type PriceParams = { extraStorage: AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; }; ` ##### extraStorage `type extraStorage = AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; ` ## PriceParams Represents the parameters for the "price" function. `type PriceParams = { units: AbiParameterToPrimitiveType<{ name: "units"; type: "uint256"; }>; }; ` ##### units `type units = AbiParameterToPrimitiveType<{ name: "units"; type: "uint256"; }>; ` ## PreviewWithdrawParams Represents the parameters for the "previewWithdraw" function. `type PreviewWithdrawParams = { assets: AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; }; ` ##### assets `type assets = AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; ` ## PriceParams Represents the parameters for the "price" function. `type PriceParams = { extraStorage: AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; }; ` ##### extraStorage `type extraStorage = AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; ` ## PrivateKeyToAccountOptions `type PrivateKeyToAccountOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); privateKey: string; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### privateKey The private key to use for the account. Do not commit private key in your code and use environment variables or other secure methods to store the private key. `type privateKey = string; ` ### Example `const privateKey = process.env.PRIVATE_KEY; ` ## Profile `type Profile = { details: { address?: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); email?: string; id?: string; phone?: string; }; type: AuthOption; }; ` ##### details `type details = { address?: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); email?: string; id?: string; phone?: string; }; ` ##### type `type type = AuthOption; ` ## ProposalDeadlineParams Represents the parameters for the "proposalDeadline" function. `type ProposalDeadlineParams = { proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; }; ` ##### proposalId `type proposalId = AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; ` ## ProposalItem `type ProposalItem = { description: string; endBlock: bigint; executions: Array<{ nativeTokenValue: bigint | undefined; toAddress: string | undefined; transactionData: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) | undefined; }>; proposalId: bigint; proposer: string; startBlock: bigint; state: number; stateLabel: string | undefined; votes: ProposalVoteInfo; }; ` ##### description Description of the proposal `type description = string; ` ##### endBlock The block number where the proposal concludes its voting phase `type endBlock = bigint; ` ##### executions The array of containing info about the set of actions that will be executed onchain, should the proposal pass `type executions = Array<{ nativeTokenValue: bigint | undefined; toAddress: string | undefined; transactionData: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) | undefined; }>; ` ##### proposalId ID of the proposal `type proposalId = bigint; ` ##### proposer The wallet address of the proposer `type proposer = string; ` ##### startBlock The block number at which the proposal is open for voting `type startBlock = bigint; ` ##### state The current state of the proposal, represented in number `type state = number; ` ##### stateLabel The current state of the proposal, represented in a user-friendly string Example: "pending" | "active" | "canceled" `type stateLabel = string | undefined; ` ##### votes The current vote info. See type [ProposalVoteInfo](https://portal.thirdweb.com/references/typescript/v5/ProposalItem) for more context `type votes = ProposalVoteInfo; ` ## ProposalSnapshotParams Represents the parameters for the "proposalSnapshot" function. `type ProposalSnapshotParams = { proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; }; ` ##### proposalId `type proposalId = AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; ` ## ProposalState `enum ProposalState { active, canceled, defeated, executed, expired, pending, queued, succeeded, } ` #### active `1; ` #### canceled `2; ` #### defeated `3; ` #### executed `7; ` #### expired `6; ` #### pending `0; ` #### queued `5; ` #### succeeded `4; ` ## ProposalVotesParams Represents the parameters for the "proposalVotes" function. `type ProposalVotesParams = { proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; }; ` ##### proposalId `type proposalId = AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; ` ## ProposalsParams Represents the parameters for the "proposals" function. `type ProposalsParams = { key: AbiParameterToPrimitiveType<{ name: "key"; type: "uint256" }>; }; ` ##### key `type key = AbiParameterToPrimitiveType<{ name: "key"; type: "uint256"; }>; ` ## ProposeParams Represents the parameters for the "propose" function. `type ProposeParams = WithOverrides<{ calldatas: AbiParameterToPrimitiveType<{ name: "calldatas"; type: "bytes[]"; }>; description: AbiParameterToPrimitiveType<{ name: "description"; type: "string"; }>; targets: AbiParameterToPrimitiveType<{ name: "targets"; type: "address[]"; }>; values: AbiParameterToPrimitiveType<{ name: "values"; type: "uint256[]"; }>; }>; ` ## PublishContractParams `type PublishContractParams = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); metadata: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult) & { version: string }; previousMetadata?: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### metadata `type metadata = [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult) & { version: string }; ` ##### previousMetadata `type previousMetadata = [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); ` ## QuorumParams Represents the parameters for the "quorum" function. `type QuorumParams = { blockNumber: AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; }; ` ##### blockNumber `type blockNumber = AbiParameterToPrimitiveType<{ name: "blockNumber"; type: "uint256"; }>; ` ## QuoteExactInputParams Represents the parameters for the "quoteExactInput" function. `type QuoteExactInputParams = WithOverrides<{ amountIn: AbiParameterToPrimitiveType<{ name: "amountIn"; type: "uint256"; }>; path: AbiParameterToPrimitiveType<{ name: "path"; type: "bytes" }>; }>; ` ## QuoteExactOutputParams Represents the parameters for the "quoteExactOutput" function. `type QuoteExactOutputParams = WithOverrides<{ amountOut: AbiParameterToPrimitiveType<{ name: "amountOut"; type: "uint256"; }>; path: AbiParameterToPrimitiveType<{ name: "path"; type: "bytes" }>; }>; ` ## QuoteExactOutputSingleParams Represents the parameters for the "quoteExactOutputSingle" function. `type QuoteExactOutputSingleParams = WithOverrides<{ amountOut: AbiParameterToPrimitiveType<{ name: "amountOut"; type: "uint256"; }>; fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; sqrtPriceLimitX96: AbiParameterToPrimitiveType<{ name: "sqrtPriceLimitX96"; type: "uint160"; }>; tokenIn: AbiParameterToPrimitiveType<{ name: "tokenIn"; type: "address"; }>; tokenOut: AbiParameterToPrimitiveType<{ name: "tokenOut"; type: "address"; }>; }>; ` ## QuoteExactInputSingleParams Represents the parameters for the "quoteExactInputSingle" function. `type QuoteExactInputSingleParams = WithOverrides<{ amountIn: AbiParameterToPrimitiveType<{ name: "amountIn"; type: "uint256"; }>; fee: AbiParameterToPrimitiveType<{ name: "fee"; type: "uint24" }>; sqrtPriceLimitX96: AbiParameterToPrimitiveType<{ name: "sqrtPriceLimitX96"; type: "uint160"; }>; tokenIn: AbiParameterToPrimitiveType<{ name: "tokenIn"; type: "address"; }>; tokenOut: AbiParameterToPrimitiveType<{ name: "tokenOut"; type: "address"; }>; }>; ` ## ReadContractOptions `type ReadContractOptions< TAbi extends Abi = [], TMethod extends | AbiFunction | string | (( contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), ) => Promise) = TAbi extends { length: 0 } ? AbiFunction | string : ExtractAbiFunctionNames, TPreparedMethod extends PreparedMethod< ParseMethod > = PreparedMethod>, > = [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< Omit< TransactionRequest, | "from" | "to" | "data" | "value" | "accessList" | "gas" | "gasPrice" | "maxFeePerGas" | "maxPriorityFeePerGas" | "nonce" > & { from?: string; method: TMethod | TPreparedMethod; } & ParamsOption & Omit< [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions), "to" | "data" | "chain" | "client" >, TAbi >; ` ## RecoverParams Represents the parameters for the "recover" function. `type RecoverParams = WithOverrides<{ deadline: AbiParameterToPrimitiveType<{ name: "deadline"; type: "uint256"; }>; from: AbiParameterToPrimitiveType<{ name: "from"; type: "address"; }>; sig: AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes" }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; }>; ` ## RecoverForParams Represents the parameters for the "recoverFor" function. `type RecoverForParams = WithOverrides<{ from: AbiParameterToPrimitiveType<{ name: "from"; type: "address"; }>; recoveryDeadline: AbiParameterToPrimitiveType<{ name: "recoveryDeadline"; type: "uint256"; }>; recoverySig: AbiParameterToPrimitiveType<{ name: "recoverySig"; type: "bytes"; }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; toDeadline: AbiParameterToPrimitiveType<{ name: "toDeadline"; type: "uint256"; }>; toSig: AbiParameterToPrimitiveType<{ name: "toSig"; type: "bytes"; }>; }>; ` ## RecoveryOfParams Represents the parameters for the "recoveryOf" function. `type RecoveryOfParams = { fid: AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256" }>; }; ` ##### fid `type fid = AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256"; }>; ` ## RedeemParams Represents the parameters for the "redeem" function. `type RedeemParams = WithOverrides<{ owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; shares: AbiParameterToPrimitiveType<{ name: "shares"; type: "uint256"; }>; }>; ` ## ReadContractResult `type ReadContractResult> = outputs extends { length: 0 } ? never : outputs extends { length: 1 } ? AbiParametersToPrimitiveTypes[0] : AbiParametersToPrimitiveTypes ` ## RefreshJWTParams `type RefreshJWTParams = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); expirationTime?: number; jwt: string; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### expirationTime `type expirationTime = number; ` ##### jwt `type jwt = string; ` ## RegisterFidAndSignerParams Represents the parameters for the `registerFidAndSigner` function. `type RegisterFidAndSignerParams = Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number; recoveryAddress: Address; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { userAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { addSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); deadline: bigint; registerSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); userAddress: Address; } ) & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) >; ` ## RegisterForParams Represents the parameters for the "registerFor" function. `type RegisterForParams = WithOverrides<{ deadline: AbiParameterToPrimitiveType<{ name: "deadline"; type: "uint256"; }>; extraStorage: AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; recovery: AbiParameterToPrimitiveType<{ name: "recovery"; type: "address"; }>; sig: AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes" }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; }>; ` ## RegisterMessage `type RegisterMessage = { deadline: bigint; nonce: bigint; recovery: Address; to: Address; }; ` ##### deadline Unix timestamp when this message expires `type deadline = bigint; ` ##### nonce IdGateway nonce for signer address `type nonce = bigint; ` ##### recovery FID recovery address `type recovery = Address; ` ##### to FID custody address `type to = Address; ` ## RegisterFidParams Represents the parameters for the `registerFid` function. `type RegisterFidParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | string | number; recoveryAddress: Address; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### extraStorage `type extraStorage = bigint | string | number; ` ##### recoveryAddress `type recoveryAddress = Address; ` ## RegisterParams Represents the parameters for the "register" function. `type RegisterParams = WithOverrides<{ extraStorage: AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; recovery: AbiParameterToPrimitiveType<{ name: "recovery"; type: "address"; }>; }>; ` ## RegisterParams Represents the parameters for the "register" function. `type RegisterParams = WithOverrides<{ extraStorage: AbiParameterToPrimitiveType<{ name: "extraStorage"; type: "uint256"; }>; registerParams: AbiParameterToPrimitiveType<{ components: [ { name: "to"; type: "address" }, { name: "recovery"; type: "address" }, { name: "deadline"; type: "uint256" }, { name: "sig"; type: "bytes" }, ]; name: "registerParams"; type: "tuple"; }>; signerParams: AbiParameterToPrimitiveType<{ components: [ { name: "keyType"; type: "uint32" }, { name: "key"; type: "bytes" }, { name: "metadataType"; type: "uint8" }, { name: "metadata"; type: "bytes" }, { name: "deadline"; type: "uint256" }, { name: "sig"; type: "bytes" }, ]; name: "signerParams"; type: "tuple[]"; }>; }>; ` ## ReleasableParams Represents the parameters for the "releasable" function. `type ReleasableParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ## RelayParams Represents the parameters for the "relay" function. `type RelayParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes" }>; target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; value: AbiParameterToPrimitiveType<{ name: "value"; type: "uint256"; }>; }>; ` ## ReleaseParams Represents the parameters for the "release" function. `type ReleaseParams = WithOverrides<{ account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; }>; ` ## ReleasedParams Represents the parameters for the "released" function. `type ReleasedParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ## RemoveAdminOptions `type RemoveAdminOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); adminAddress: string }; ` ##### account The admin account that will perform the operation. `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### adminAddress The address to remove as an admin. `type adminAddress = string; ` ## RemoveParams Represents the parameters for the "remove" function. `type RemoveParams = WithOverrides<{ chainId: AbiParameterToPrimitiveType<{ name: "_chainId"; type: "uint256"; }>; deployer: AbiParameterToPrimitiveType<{ name: "_deployer"; type: "address"; }>; deployment: AbiParameterToPrimitiveType<{ name: "_deployment"; type: "address"; }>; }>; ` ## RenounceRoleParams `type RenounceRoleParams = { role: RoleInput; targetAccountAddress: Address; }; ` ##### role `type role = RoleInput; ` ##### targetAccountAddress `type targetAccountAddress = Address; ` ## RemoveSessionKeyOptions `type RemoveSessionKeyOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); sessionKeyAddress: string; }; ` ##### account The account that will perform the operation. `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### sessionKeyAddress The address to remove as a session key. `type sessionKeyAddress = string; ` ## RenounceRolesParams Represents the parameters for the "renounceRoles" function. `type RenounceRolesParams = WithOverrides<{ roles: AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; }>; ` ## RentStorageParams Represents the parameters for the `rentStorage` function. `type RentStorageParams = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; fid: bigint | number | string; units?: bigint | number | string; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### disableCache `type disableCache = boolean; ` ##### fid `type fid = bigint | number | string; ` ##### units `type units = bigint | number | string; ` ## ResolveAddressOptions `type ResolveAddressOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### name `type name = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveAddressOptions `type ResolveAddressOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### name `type name = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveArweaveSchemeOptions `type ResolveArweaveSchemeOptions = { gatewayUrl?: string; uri: string; }; ` ##### gatewayUrl `type gatewayUrl = string; ` ##### uri `type uri = string; ` ## ResolveAvatarOptions `type ResolveAvatarOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### name `type name = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveL2NameOptions `type ResolveL2NameOptions = { address: Address; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress: string; resolverChain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### address `type address = Address; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveLensAddressParams `type ResolveLensAddressParams = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleContractAddress?: string }; }; ` ##### client a [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### name Either a full lens handle, or a lens localName Examples: * Full handle: "lens/vitalik" * Just local name: "vitalik" `type name = string; ` ##### overrides Override parameters for Lens contract, defaults to LensHandle contract on Polygon `type overrides = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleContractAddress?: string; }; ` ## ResolveNameOptions `type ResolveNameOptions = { address: Address; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### address `type address = Address; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveParams Represents the parameters for the "resolve" function. `type ResolveParams = { handleId: AbiParameterToPrimitiveType<{ name: "handleId"; type: "uint256"; }>; }; ` ##### handleId `type handleId = AbiParameterToPrimitiveType<{ name: "handleId"; type: "uint256"; }>; ` ## ResolveSchemeOptions `type ResolveSchemeOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### uri `type uri = string; ` ## ResolveTextOptions `type ResolveTextOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); key: string; name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### key `type key = string; ` ##### name `type name = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## ResolveUDNameOptions `type ResolveUDNameOptions = { address: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ##### address `type address = string; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ## RevealParams `type RevealParams = { batchId: bigint; password: string }; ` ##### batchId `type batchId = bigint; ` ##### password `type password = string; ` ## RevokeRoleParams `type RevokeRoleParams = { role: RoleInput; targetAccountAddress: Address; }; ` ##### role `type role = RoleInput; ` ##### targetAccountAddress `type targetAccountAddress = Address; ` ## PayEmbed Embed a prebuilt UI for funding wallets, purchases or transactions with crypto or fiat. ### Example #### Default configuration By default, the `PayEmbed` component will allows users to fund their wallets with crypto or fiat on any of the supported chains.. `; ` #### Top up wallets You can set the `mode` option to `"fund_wallet"` to allow users to top up their wallets with crypto or fiat. `; ` #### Direct Payments You can set the `mode` option to `"direct_payment"` to allow users to make a direct payment to a wallet address. `; ` #### Transactions You can set the `mode` option to `"transaction"` to allow users to execute a transaction with a different wallet, chain or token. `; ` You can also handle ERC20 payments by passing `erc20value` to your transaction: ` ` #### Enable/Disable payment methods You can disable the use of crypto or fiat by setting the `buyWithCrypto` or `buyWithFiat` options to `false` . ```` ### Customize the UI You can customize the UI of the `PayEmbed` component by passing a custom theme object to the `theme` prop. ```tsx ```` Refer to the [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) type for more details. #### Configure the wallet connection You can customize the wallet connection flow by passing a `connectOptions` object to the `PayEmbed` component. `; ` Refer to the [PayEmbedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions) type for more details. @buyCrypto ##### Signature `function PayEmbed(props: [PayEmbedProps](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps)): Element; ` ### Parameters ##### props Props of type [PayEmbedProps](https://portal.thirdweb.com/references/typescript/v5/PayEmbedProps) to configure the PayEmbed component. #### Type `let props: { activeWallet?: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); className?: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectOptions?: [PayEmbedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/PayEmbedConnectOptions); hiddenWallets?: Array<[WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)>; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); payOptions?: [PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions); style?: React.CSSProperties; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); theme?: "light" | "dark" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); }; ` ### Returns ##### Return Type `let returnType: Element; ` ## RevokeRolesParams Represents the parameters for the "revokeRoles" function. `type RevokeRolesParams = WithOverrides<{ roles: AbiParameterToPrimitiveType<{ name: "roles"; type: "uint256"; }>; user: AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; }>; ` ## ReverseNameOfParams Represents the parameters for the "reverseNameOf" function. `type ReverseNameOfParams = { addr: AbiParameterToPrimitiveType<{ name: "addr"; type: "address"; }>; }; ` ##### addr `type addr = AbiParameterToPrimitiveType<{ name: "addr"; type: "address"; }>; ` ## RoleAdminChangedEventFilters Represents the filters for the "RoleAdminChanged" event. `type RoleAdminChangedEventFilters = Partial<{ newAdminRole: AbiParameterToPrimitiveType<{ indexed: true; name: "newAdminRole"; type: "bytes32"; }>; previousAdminRole: AbiParameterToPrimitiveType<{ indexed: true; name: "previousAdminRole"; type: "bytes32"; }>; role: AbiParameterToPrimitiveType<{ indexed: true; name: "role"; type: "bytes32"; }>; }>; ` ## RoleGrantedEventFilters Represents the filters for the "RoleGranted" event. `type RoleGrantedEventFilters = Partial<{ account: AbiParameterToPrimitiveType<{ indexed: true; name: "account"; type: "address"; }>; role: AbiParameterToPrimitiveType<{ indexed: true; name: "role"; type: "bytes32"; }>; sender: AbiParameterToPrimitiveType<{ indexed: true; name: "sender"; type: "address"; }>; }>; ` ## RoleRevokedEventFilters Represents the filters for the "RoleRevoked" event. `type RoleRevokedEventFilters = Partial<{ account: AbiParameterToPrimitiveType<{ indexed: true; name: "account"; type: "address"; }>; role: AbiParameterToPrimitiveType<{ indexed: true; name: "role"; type: "bytes32"; }>; sender: AbiParameterToPrimitiveType<{ indexed: true; name: "sender"; type: "address"; }>; }>; ` ## RolesOfParams Represents the parameters for the "rolesOf" function. `type RolesOfParams = { user: AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; }; ` ##### user `type user = AbiParameterToPrimitiveType<{ name: "user"; type: "address"; }>; ` ## RoyaltyInfoParams Represents the parameters for the "royaltyInfo" function. `type RoyaltyInfoParams = { salePrice: AbiParameterToPrimitiveType<{ name: "_salePrice"; type: "uint256"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### salePrice `type salePrice = AbiParameterToPrimitiveType<{ name: "_salePrice"; type: "uint256"; }>; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## RoyaltyInfoParams Represents the parameters for the "royaltyInfo" function. `type RoyaltyInfoParams = { salePrice: AbiParameterToPrimitiveType<{ name: "_salePrice"; type: "uint256"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### salePrice `type salePrice = AbiParameterToPrimitiveType<{ name: "_salePrice"; type: "uint256"; }>; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## SafeBatchTransferFromParams Represents the parameters for the "safeBatchTransferFrom" function. `type SafeBatchTransferFromParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "_data"; type: "bytes" }>; from: AbiParameterToPrimitiveType<{ name: "_from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ name: "_to"; type: "address" }>; tokenIds: AbiParameterToPrimitiveType<{ name: "tokenIds"; type: "uint256[]"; }>; values: AbiParameterToPrimitiveType<{ name: "_values"; type: "uint256[]"; }>; }>; ` ## SafeTransferFromParams Represents the parameters for the "safeTransferFrom" function. `type SafeTransferFromParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "_data"; type: "bytes" }>; from: AbiParameterToPrimitiveType<{ name: "_from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ name: "_to"; type: "address" }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; value: AbiParameterToPrimitiveType<{ name: "_value"; type: "uint256"; }>; }>; ` ## SaveSnapshotParams `type SaveSnapshotParams = { merkleRoot: string; snapshotUri: string }; ` ##### merkleRoot `type merkleRoot = string; ` ##### snapshotUri `type snapshotUri = string; ` ## SendBatchTransactionOptions `type SendBatchTransactionOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### transactions `type transactions = Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; ` ## SendCallsOptions `type SendCallsOptions< ID extends [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId) = [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId), abi extends Abi = [], abiFunction extends AbiFunction = AbiFunction, > = { calls: Array<[PreparedSendCall](https://portal.thirdweb.com/references/typescript/v5/PreparedSendCall)>; capabilities?: [WalletSendCallsParameters](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsParameters)[number]["capabilities"]; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); version?: [WalletSendCallsParameters](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsParameters)[number]["version"]; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ##### calls `type calls = Array<[PreparedSendCall](https://portal.thirdweb.com/references/typescript/v5/PreparedSendCall)>; ` ##### capabilities `type capabilities = [WalletSendCallsParameters](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsParameters)[number]["capabilities"]; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### version `type version = [WalletSendCallsParameters](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsParameters)[number]["version"]; ` ##### wallet `type wallet = [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ## SendTransactionConfig Configuration for the `useSendTransaction` hook. `type SendTransactionConfig = { gasless?: [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); payModal?: [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); }; ` ##### gasless Configuration for gasless transactions. Refer to [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions) for more details. `type gasless = [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); ` ##### payModal Refer to [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig) for more details. `type payModal = [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); ` ## SendTransactionOptions Send transaction options `type SendTransactionOptions = { account: Account; gasless: GaslessOptions; transaction: PreparedTransaction; }; ` ##### account The account to send the transaction with `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### gasless Gasless options for the transaction, if applicable `type gasless = [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); ` ##### transaction The prepared transaction to send `type transaction = [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ## SendTransactionPayModalConfig Configuration for the "Pay Modal" that opens when the user doesn't have enough funds to send a transaction. Set `payModal: false` to disable the "Pay Modal" popup This configuration object includes the following properties to configure the "Pay Modal" UI: #### `locale` The language to use for the "Pay Modal" UI. Defaults to `"en_US"` . #### `supportedTokens` An object of type [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens) to configure the tokens to show for a chain. #### `theme` The theme to use for the "Pay Modal" UI. Defaults to `"dark"` . It can be set to `"light"` or `"dark"` or an object of type [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) for a custom theme. Refer to [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme) helper functions to use the default light or dark theme and customize it. `type SendTransactionPayModalConfig = | { buyWithCrypto?: false | { testMode?: boolean }; buyWithFiat?: | false | { preferredProvider?: FiatProvider; prefillSource?: { currency?: "USD" | "CAD" | "GBP" | "EUR" | "JPY"; }; testMode?: boolean; }; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); metadata?: { image?: string; name?: string }; onPurchaseSuccess?: ( info: | { status: [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus); type: "crypto" } | { status: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); type: "fiat" } | { chainId: number; transactionHash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); type: "transaction"; }, ) => void; purchaseData?: object; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); theme?: [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) | "light" | "dark"; } | false; ` ## SerializeTransactionOptions `type SerializeTransactionOptions = { signature?: | ox__Signature.Signature | ox__Signature.Legacy<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex), bigint>; transaction: SerializableTransaction; }; ` ##### signature `type signature = | ox__Signature.Signature | ox__Signature.Legacy<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex), bigint>; ` ##### transaction `type transaction = SerializableTransaction; ` ## SetApprovalForAllParams Represents the parameters for the "setApprovalForAll" function. `type SetApprovalForAllParams = WithOverrides<{ approved: AbiParameterToPrimitiveType<{ name: "_approved"; type: "bool"; }>; operator: AbiParameterToPrimitiveType<{ name: "operator"; type: "address"; }>; }>; ` ## SetApprovalForAllParams Represents the parameters for the "setApprovalForAll" function. `type SetApprovalForAllParams = WithOverrides<{ approved: AbiParameterToPrimitiveType<{ name: "_approved"; type: "bool"; }>; operator: AbiParameterToPrimitiveType<{ name: "_operator"; type: "address"; }>; }>; ` ## SetClaimConditionsParams `type SetClaimConditionsParams = { phases: Array; resetClaimEligibility?: boolean; singlePhaseDrop?: boolean; }; ` ##### phases `type phases = Array; ` ##### resetClaimEligibility `type resetClaimEligibility = boolean; ` ##### singlePhaseDrop `type singlePhaseDrop = boolean; ` ## SetClaimConditionsParams `type SetClaimConditionsParams = { phases: Array; resetClaimEligibility?: boolean; singlePhaseDrop?: boolean; }; ` ##### phases `type phases = Array; ` ##### resetClaimEligibility `type resetClaimEligibility = boolean; ` ##### singlePhaseDrop `type singlePhaseDrop = boolean; ` ## SetClaimConditionsParams `type SetClaimConditionsParams = { phases: Array; resetClaimEligibility?: boolean; singlePhaseDrop?: boolean; tokenId: bigint; }; ` ##### phases `type phases = Array; ` ##### resetClaimEligibility `type resetClaimEligibility = boolean; ` ##### singlePhaseDrop `type singlePhaseDrop = boolean; ` ##### tokenId `type tokenId = bigint; ` ## SetDefaultRoyaltyInfoParams Represents the parameters for the "setDefaultRoyaltyInfo" function. `type SetDefaultRoyaltyInfoParams = WithOverrides<{ royaltyBps: AbiParameterToPrimitiveType<{ name: "_royaltyBps"; type: "uint16"; }>; royaltyRecipient: AbiParameterToPrimitiveType<{ name: "_royaltyRecipient"; type: "address"; }>; }>; ` ## SetDefaultRoyaltyInfoParams Represents the parameters for the "setDefaultRoyaltyInfo" function. `type SetDefaultRoyaltyInfoParams = WithOverrides<{ royaltyBps: AbiParameterToPrimitiveType<{ name: "_royaltyBps"; type: "uint16"; }>; royaltyRecipient: AbiParameterToPrimitiveType<{ name: "_royaltyRecipient"; type: "address"; }>; }>; ` ## SetMerkleRootParams Represents the parameters for the "setMerkleRoot" function. `type SetMerkleRootParams = WithOverrides<{ resetClaimStatus: AbiParameterToPrimitiveType<{ name: "_resetClaimStatus"; type: "bool"; }>; token: AbiParameterToPrimitiveType<{ name: "_token"; type: "address"; }>; tokenMerkleRoot: AbiParameterToPrimitiveType<{ name: "_tokenMerkleRoot"; type: "bytes32"; }>; }>; ` ## SetDefaultRoyaltyInfoParams Represents the parameters for the "setDefaultRoyaltyInfo" function. `type SetDefaultRoyaltyInfoParams = WithOverrides<{ royaltyBps: AbiParameterToPrimitiveType<{ name: "_royaltyBps"; type: "uint256"; }>; royaltyRecipient: AbiParameterToPrimitiveType<{ name: "_royaltyRecipient"; type: "address"; }>; }>; ` ## SetOwnerParams Represents the parameters for the "setOwner" function. `type SetOwnerParams = WithOverrides<{ newOwner: AbiParameterToPrimitiveType<{ name: "newOwner"; type: "address"; }>; }>; ` ## SetPlatformFeeInfoParams Represents the parameters for the "setPlatformFeeInfo" function. `type SetPlatformFeeInfoParams = WithOverrides<{ platformFeeBps: AbiParameterToPrimitiveType<{ name: "_platformFeeBps"; type: "uint256"; }>; platformFeeRecipient: AbiParameterToPrimitiveType<{ name: "_platformFeeRecipient"; type: "address"; }>; }>; ` ## SetOwnerParams Represents the parameters for the "setOwner" function. `type SetOwnerParams = WithOverrides<{ newOwner: AbiParameterToPrimitiveType<{ name: "_newOwner"; type: "address"; }>; }>; ` ## SetPrimarySaleRecipientParams Represents the parameters for the "setPrimarySaleRecipient" function. `type SetPrimarySaleRecipientParams = WithOverrides<{ saleRecipient: AbiParameterToPrimitiveType<{ name: "_saleRecipient"; type: "address"; }>; }>; ` ## SetPublisherProfileUriParams Represents the parameters for the "setPublisherProfileUri" function. `type SetPublisherProfileUriParams = WithOverrides<{ publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; uri: AbiParameterToPrimitiveType<{ name: "uri"; type: "string" }>; }>; ` ## SetProposalThresholdParams Represents the parameters for the "setProposalThreshold" function. `type SetProposalThresholdParams = WithOverrides<{ newProposalThreshold: AbiParameterToPrimitiveType<{ name: "newProposalThreshold"; type: "uint256"; }>; }>; ` ## SetRoyaltyInfoForTokenParams Represents the parameters for the "setRoyaltyInfoForToken" function. `type SetRoyaltyInfoForTokenParams = WithOverrides<{ bps: AbiParameterToPrimitiveType<{ name: "_bps"; type: "uint16" }>; recipient: AbiParameterToPrimitiveType<{ name: "_recipient"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }>; ` ## SetRoyaltyInfoForTokenParams Represents the parameters for the "setRoyaltyInfoForToken" function. `type SetRoyaltyInfoForTokenParams = WithOverrides<{ bps: AbiParameterToPrimitiveType<{ name: "_bps"; type: "uint16" }>; recipient: AbiParameterToPrimitiveType<{ name: "_recipient"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }>; ` ## SetRoyaltyInfoForTokenParams Represents the parameters for the "setRoyaltyInfoForToken" function. `type SetRoyaltyInfoForTokenParams = WithOverrides<{ bps: AbiParameterToPrimitiveType<{ name: "bps"; type: "uint256" }>; recipient: AbiParameterToPrimitiveType<{ name: "recipient"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }>; ` ## SetTokenURIParams Represents the parameters for the "setTokenURI" function. `type SetTokenURIParams = WithOverrides<{ tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; uri: AbiParameterToPrimitiveType<{ name: "_uri"; type: "string" }>; }>; ` ## SetTokenURIParams Represents the parameters for the "setTokenURI" function. `type SetTokenURIParams = WithOverrides<{ tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; uri: AbiParameterToPrimitiveType<{ name: "_uri"; type: "string" }>; }>; ` ## SetTransferValidatorParams Represents the parameters for the "setTransferValidator" function. `type SetTransferValidatorParams = WithOverrides<{ validator: AbiParameterToPrimitiveType<{ name: "validator"; type: "address"; }>; }>; ` ## SetTransferableForParams Represents the parameters for the "setTransferableFor" function. `type SetTransferableForParams = WithOverrides<{ enableTransfer: AbiParameterToPrimitiveType<{ name: "enableTransfer"; type: "bool"; }>; target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }>; ` ## SetTransferValidatorParams Represents the parameters for the "setTransferValidator" function. `type SetTransferValidatorParams = WithOverrides<{ validator: AbiParameterToPrimitiveType<{ name: "validator"; type: "address"; }>; }>; ` ## SetTransferableForParams Represents the parameters for the "setTransferableFor" function. `type SetTransferableForParams = WithOverrides<{ enableTransfer: AbiParameterToPrimitiveType<{ name: "enableTransfer"; type: "bool"; }>; target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }>; ` ## SetSharedMetadataParams `type SetSharedMetadataParams = { nft: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) }; ` ##### nft `type nft = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ## SetTransferableForParams Represents the parameters for the "setTransferableFor" function. `type SetTransferableForParams = WithOverrides<{ enableTransfer: AbiParameterToPrimitiveType<{ name: "enableTransfer"; type: "bool"; }>; target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; }>; ` ## SharesParams Represents the parameters for the "shares" function. `type SharesParams = { account: AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; }; ` ##### account `type account = AbiParameterToPrimitiveType<{ name: "account"; type: "address"; }>; ` ## SetVotingPeriodParams Represents the parameters for the "setVotingPeriod" function. `type SetVotingPeriodParams = WithOverrides<{ newVotingPeriod: AbiParameterToPrimitiveType<{ name: "newVotingPeriod"; type: "uint256"; }>; }>; ` ## SetVotingDelayParams Represents the parameters for the "setVotingDelay" function. `type SetVotingDelayParams = WithOverrides<{ newVotingDelay: AbiParameterToPrimitiveType<{ name: "newVotingDelay"; type: "uint256"; }>; }>; ` ## SignAddOptions `type SignAddOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage) }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### message `type message = [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage); ` ## SignKeyRequestOptions `type SignKeyRequestOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### message `type message = [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage); ` ## SignLoginPayloadParams `type SignLoginPayloadParams = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); payload: [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### payload `type payload = [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); ` ## SignMessageOptions `type SignMessageOptions = { message: Message; privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ##### message `type message = Message; ` ##### privateKey `type privateKey = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## SignOptions Options for signing a transaction hash. `type SignOptions = { hash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ##### hash `type hash = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### privateKey `type privateKey = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## SignRegisterOptions `type SignRegisterOptions = { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage); }; ` ##### account `type account = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### message `type message = [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage); ` ## SignTransactionOptions `type SignTransactionOptions = { privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); transaction: SerializableTransaction; }; ` ##### privateKey `type privateKey = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### transaction `type transaction = SerializableTransaction; ` ## SignTypedDataOptions `type SignTypedDataOptions< typedData extends | ox__TypedData.TypedData | Record = ox__TypedData.TypedData, primaryType extends | keyof typedData | "EIP712Domain" = keyof typedData, > = ox__TypedData.Definition & { privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); }; ` ## SignedKeyRequestMessage `type SignedKeyRequestMessage = { deadline: bigint; key: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); requestFid: bigint; }; ` ##### deadline Unix timestamp when this message expires `type deadline = bigint; ` ##### key Signer public key `type key = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### requestFid FID of user or app requesting key `type requestFid = bigint; ` ## QuoteTokenInfo `type QuoteTokenInfo = { chainId: number; decimals: number; name?: string; priceUSDCents: number; symbol?: string; tokenAddress: string; }; ` ##### chainId `type chainId = number; ` ##### decimals `type decimals = number; ` ##### name `type name = string; ` ##### priceUSDCents `type priceUSDCents = number; ` ##### symbol `type symbol = string; ` ##### tokenAddress `type tokenAddress = string; ` ## SignedKeyRequestMetadataOptions `type SignedKeyRequestMetadataOptions = Prettify< { message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { accountAddress: Address; keyRequestSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) } ) >; ` ## SimulateOptions `type SimulateOptions< abi extends Abi, abiFn extends AbiFunction, > = Prettify< { transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); from?: never } | { account?: never; from?: string } ) >; ` ## SimulateHandleOpParams Represents the parameters for the "simulateHandleOp" function. `type SimulateHandleOpParams = WithOverrides<{ op: AbiParameterToPrimitiveType<{ components: [ { name: "sender"; type: "address" }, { name: "nonce"; type: "uint256" }, { name: "initCode"; type: "bytes" }, { name: "callData"; type: "bytes" }, { name: "callGasLimit"; type: "uint256" }, { name: "verificationGasLimit"; type: "uint256" }, { name: "preVerificationGas"; type: "uint256" }, { name: "maxFeePerGas"; type: "uint256" }, { name: "maxPriorityFeePerGas"; type: "uint256" }, { name: "paymasterAndData"; type: "bytes" }, { name: "signature"; type: "bytes" }, ]; name: "op"; type: "tuple"; }>; target: AbiParameterToPrimitiveType<{ name: "target"; type: "address"; }>; targetCallData: AbiParameterToPrimitiveType<{ name: "targetCallData"; type: "bytes"; }>; }>; ` ## SingleStepAuthArgsType `type SingleStepAuthArgsType = | SocialAuthArgsType | { encryptionKey?: string; jwt: string; strategy: "jwt" } | { encryptionKey?: string; payload: string; strategy: "auth_endpoint"; } | { email: string; strategy: "iframe_email_verification" } | { strategy: "iframe" } | { passkeyName?: string; storeLastUsedPasskey?: boolean; strategy: "passkey"; type: "sign-up" | "sign-in"; } | { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); strategy: "wallet"; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) } | { strategy: "guest" } | { strategy: "backend"; walletSecret: string }; ` ## SiteLink Creates a link to another thirdweb-supported site with wallet connection parameters. The target site must support the connected wallet (ecosystem or in-app). ### Example `import { SiteLink } from "thirdweb/react"; Visit Site ; ` ##### Signature `function SiteLink( props: { children: ReactNode; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; href: string; } & Omit, "href">, ): Element; ` ### Parameters ##### props The props to pass to the anchor tag #### Type `let props: { children: ReactNode; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; href: string; } & Omit, "href">; ` ### Returns ##### Return Type `let returnType: Element; ` ## SmartWalletConnectionOptions `type SmartWalletConnectionOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); personalAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### personalAccount `type personalAccount = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ## SmartWalletOptions `type SmartWalletOptions = Prettify< { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); factoryAddress?: string; overrides?: { accountAddress?: string; accountSalt?: string; bundlerUrl?: string; createAccount?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); entrypointAddress?: string; execute?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transaction: SendTransactionOption, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); executeBatch?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transactions: Array, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); getAccountNonce?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), ) => Promise; paymaster?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; predictAddress?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => Promise; signMessage?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); message: SignableMessage; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; signTypedData?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); typedData: ox__TypedData.Definition; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; tokenPaymaster?: TokenPaymasterConfig; }; sessionKey?: { address: string; permissions: AccountPermissions }; } & ({ gasless: boolean } | { sponsorGas: boolean }) >; ` ## SplitContractParams `type SplitContractParams = { contractURI?: string; defaultAdmin?: string; description?: string; external_link?: string; image?: FileOrBufferOrString; name: string; payees: Array; shares: Array; social_urls?: Record; symbol?: string; trustedForwarders?: Array; }; ` ##### contractURI `type contractURI = string; ` ##### defaultAdmin `type defaultAdmin = string; ` ##### description `type description = string; ` ##### external\_link `type external_link = string; ` ##### image `type image = FileOrBufferOrString; ` ##### name `type name = string; ` ##### payees An array of strings containing wallet addresses of the recipients For example: `["0x...123", "0x...456"]; ` `type payees = Array; ` ##### shares An array of bigints containing the shared percentages of each respective payees. Must have the same length as `payees` `type shares = Array; ` ### Example `[ 5100n, // 51% 4900n, // 49% ]; ` ##### social\_urls `type social_urls = Record; ` ##### symbol `type symbol = string; ` ##### trustedForwarders `type trustedForwarders = Array; ` ## SocialProfile `type SocialProfile = { avatar?: string; bio?: string; metadata?: [FarcasterProfile](https://portal.thirdweb.com/references/typescript/v5/FarcasterProfile) | [LensProfile](https://portal.thirdweb.com/references/typescript/v5/LensProfile) | [EnsProfile](https://portal.thirdweb.com/references/typescript/v5/EnsProfile); name?: string; type: "farcaster" | "lens" | "ens"; }; ` ##### avatar `type avatar = string; ` ##### bio `type bio = string; ` ##### metadata `type metadata = [FarcasterProfile](https://portal.thirdweb.com/references/typescript/v5/FarcasterProfile) | [LensProfile](https://portal.thirdweb.com/references/typescript/v5/LensProfile) | [EnsProfile](https://portal.thirdweb.com/references/typescript/v5/EnsProfile); ` ##### name `type name = string; ` ##### type `type type = "farcaster" | "lens" | "ens"; ` ## StandaloneWCConnectOptions `type StandaloneWCConnectOptions = [WCConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions)["walletConnect"] & { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ## StateParams Represents the parameters for the "state" function. `type StateParams = { proposalId: AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; }; ` ##### proposalId `type proposalId = AbiParameterToPrimitiveType<{ name: "proposalId"; type: "uint256"; }>; ` ## SplitRecipient `type SplitRecipient = { address: string; splitPercentage: number }; ` ##### address The address of the recipient `type address = string; ` ##### splitPercentage The split of the recipient as a percentage of the total amount I.e. If a recipient has a split of 50%, and the asset sells for 100 ETH, the recipient will receive 50 ETH. `type splitPercentage = number; ` ## StoredTransaction `type StoredTransaction = { chainId: number; transactionHash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ##### chainId `type chainId = number; ` ##### transactionHash `type transactionHash = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## StringToBytesOpts `type StringToBytesOpts = { size?: number }; ` ##### size Size of the output bytes. `type size = number; ` ## Theme `type Theme = { colors: { accentButtonBg: string; accentButtonText: string; accentText: string; borderColor: string; connectedButtonBg: string; connectedButtonBgHover: string; danger: string; inputAutofillBg: string; modalBg: string; modalOverlayBg: string; primaryButtonBg: string; primaryButtonText: string; primaryText: string; scrollbarBg: string; secondaryButtonBg: string; secondaryButtonHoverBg: string; secondaryButtonText: string; secondaryIconColor: string; secondaryIconHoverBg: string; secondaryIconHoverColor: string; secondaryText: string; selectedTextBg: string; selectedTextColor: string; separatorLine: string; skeletonBg: string; success: string; tertiaryBg: string; tooltipBg: string; tooltipText: string; }; fontFamily: string; type: "light" | "dark"; }; ` ##### colors `type colors = { accentButtonBg: string; accentButtonText: string; accentText: string; borderColor: string; connectedButtonBg: string; connectedButtonBgHover: string; danger: string; inputAutofillBg: string; modalBg: string; modalOverlayBg: string; primaryButtonBg: string; primaryButtonText: string; primaryText: string; scrollbarBg: string; secondaryButtonBg: string; secondaryButtonHoverBg: string; secondaryButtonText: string; secondaryIconColor: string; secondaryIconHoverBg: string; secondaryIconHoverColor: string; secondaryText: string; selectedTextBg: string; selectedTextColor: string; separatorLine: string; skeletonBg: string; success: string; tertiaryBg: string; tooltipBg: string; tooltipText: string; }; ` ##### fontFamily `type fontFamily = string; ` ##### type `type type = "light" | "dark"; ` ## ThemeOverrides `type ThemeOverrides = { [key in Exclude]: Partial<[Theme](https://portal.thirdweb.com/references/typescript/v5/Theme)[key]>; }; ` ## ThirdwebClient `type ThirdwebClient = { readonly clientId: string; readonly secretKey: string | undefined; } & Readonly; ` ## ThirdwebContract `` type ThirdwebContract< abi extends Abi = [], address extends string = `0x${string}`, > = Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ## ToBytesParameters `type ToBytesParameters = { size?: number }; ` ##### size Size of the output bytes. `type size = number; ` ## ThirdwebProvider The ThirdwebProvider is component is a provider component that sets up the React Query client. ### Example `import { ThirdwebProvider } from "thirdweb/react"; function Example() { return ( ); } ` ##### Signature `function ThirdwebProvider( props: PropsWithChildren<{ connectionManager?: { activeAccountStore: Store; activeWalletChainStore: Store< undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }> >; activeWalletConnectionStatusStore: Store<[ConnectionStatus](https://portal.thirdweb.com/references/typescript/v5/ConnectionStatus)>; activeWalletStore: Store; addConnectedWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; connect: ( wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet), options?: [ConnectManagerOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectManagerOptions), ) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; connectedWallets: ReadonlyStore>; defineChains: ( chains: Array>, ) => void; disconnectWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; handleConnection: ( wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet), options?: [ConnectManagerOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectManagerOptions), ) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; isAutoConnecting: Store; removeConnectedWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; setActiveWallet: (activeWallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => Promise; switchActiveWalletChain: (chain: Readonly) => Promise; }; }>, ): Element; ` ### Parameters ##### props The props for the ThirdwebProvider #### Type `let props: PropsWithChildren<{ connectionManager?: { activeAccountStore: Store; activeWalletChainStore: Store< undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }> >; activeWalletConnectionStatusStore: Store<[ConnectionStatus](https://portal.thirdweb.com/references/typescript/v5/ConnectionStatus)>; activeWalletStore: Store; addConnectedWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; connect: ( wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet), options?: [ConnectManagerOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectManagerOptions), ) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; connectedWallets: ReadonlyStore>; defineChains: ( chains: Array>, ) => void; disconnectWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; handleConnection: ( wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet), options?: [ConnectManagerOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectManagerOptions), ) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; isAutoConnecting: Store; removeConnectedWallet: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; setActiveWallet: (activeWallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => Promise; switchActiveWalletChain: (chain: Readonly) => Promise; }; }>; ` ### Returns ##### Return Type `let returnType: Element; ` ## ToEip1193ProviderOptions `type ToEip1193ProviderOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectOverride?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => Promise; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### connectOverride ##### Signature `function connectOverride(wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)): Promise; ` ##### Parameters ##### wallet ###### Type `let wallet: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` ##### wallet `type wallet = [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ## ToHexParameters `type ToHexParameters = { size?: number }; ` ##### size The size (in bytes) of the output hex value. `type size = number; ` ## TokenConditionIdParams Represents the parameters for the "tokenConditionId" function. `type TokenConditionIdParams = { tokenAddress: AbiParameterToPrimitiveType<{ name: "tokenAddress"; type: "address"; }>; }; ` ##### tokenAddress `type tokenAddress = AbiParameterToPrimitiveType<{ name: "tokenAddress"; type: "address"; }>; ` ## ToSerializableTransactionOptions `type ToSerializableTransactionOptions = { from?: string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); }; ` ##### from The from address or account to use for gas estimation and authorization signing. `type from = string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### transaction The transaction to convert to a serializable transaction. `type transaction = [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ## TokenDataOfParams Represents the parameters for the "tokenDataOf" function. `type TokenDataOfParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## TokenInfo `type TokenInfo = { address: string; icon?: string; name: string; symbol: string; }; ` ##### address `type address = string; ` ##### icon `type icon = string; ` ##### name `type name = string; ` ##### symbol `type symbol = string; ` ## TokenMerkleRootParams Represents the parameters for the "tokenMerkleRoot" function. `type TokenMerkleRootParams = { tokenAddress: AbiParameterToPrimitiveType<{ name: "tokenAddress"; type: "address"; }>; }; ` ##### tokenAddress `type tokenAddress = AbiParameterToPrimitiveType<{ name: "tokenAddress"; type: "address"; }>; ` ## TokenOfOwnerByIndexParams Represents the parameters for the "tokenOfOwnerByIndex" function. `type TokenOfOwnerByIndexParams = { index: AbiParameterToPrimitiveType<{ name: "_index"; type: "uint256"; }>; owner: AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; }; ` ##### index `type index = AbiParameterToPrimitiveType<{ name: "_index"; type: "uint256"; }>; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "_owner"; type: "address"; }>; ` ## TokenProvider A React context provider component that supplies Token-related data to its child components. This component serves as a wrapper around the `TokenProviderContext.Provider` and passes the provided token data down to all of its child components through the context API. ### Example #### Basic usage `import { TokenProvider, TokenIcon, TokenName } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ` #### This component also works with native token! `import { NATIVE_TOKEN_ADDRESS } from "thirdweb"; import { ethereum } from "thirdweb/chains"; // "ETH" ; ` ##### Signature `function TokenProvider( props: PropsWithChildren<[TokenProviderProps](https://portal.thirdweb.com/references/typescript/v5/TokenProviderProps)>, ): Element; ` ### Parameters ##### props #### Type `let props: PropsWithChildren<[TokenProviderProps](https://portal.thirdweb.com/references/typescript/v5/TokenProviderProps)>; ` ### Returns ##### Return Type `let returnType: Element; ` ## TokenProviderProps Props for the `` component `type TokenProviderProps = { address: Address; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### address The token (ERC20) contract address `type address = Address; ` ##### chain The chain (network) that the token is on `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client thirdweb Client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## TokenURIParams Represents the parameters for the "tokenURI" function. `type TokenURIParams = { tokenId: AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "_tokenId"; type: "uint256"; }>; ` ## TokenURIRevealedEventFilters Represents the filters for the "TokenURIRevealed" event. `type TokenURIRevealedEventFilters = Partial<{ index: AbiParameterToPrimitiveType<{ indexed: true; name: "index"; type: "uint256"; }>; }>; ` ## TokensClaimedEventFilters Represents the filters for the "TokensClaimed" event. `type TokensClaimedEventFilters = Partial<{ claimConditionIndex: AbiParameterToPrimitiveType<{ indexed: true; name: "claimConditionIndex"; type: "uint256"; }>; claimer: AbiParameterToPrimitiveType<{ indexed: true; name: "claimer"; type: "address"; }>; receiver: AbiParameterToPrimitiveType<{ indexed: true; name: "receiver"; type: "address"; }>; }>; ` ## TokensLazyMintedEventFilters Represents the filters for the "TokensLazyMinted" event. `type TokensLazyMintedEventFilters = Partial<{ startTokenId: AbiParameterToPrimitiveType<{ indexed: true; name: "startTokenId"; type: "uint256"; }>; }>; ` ## TokensClaimedEventFilters Represents the filters for the "TokensClaimed" event. `type TokensClaimedEventFilters = Partial<{ claimConditionIndex: AbiParameterToPrimitiveType<{ indexed: true; name: "claimConditionIndex"; type: "uint256"; }>; claimer: AbiParameterToPrimitiveType<{ indexed: true; name: "claimer"; type: "address"; }>; receiver: AbiParameterToPrimitiveType<{ indexed: true; name: "receiver"; type: "address"; }>; }>; ` ## TokensMintedEventFilters Represents the filters for the "TokensMinted" event. `type TokensMintedEventFilters = Partial<{ mintedTo: AbiParameterToPrimitiveType<{ indexed: true; name: "mintedTo"; type: "address"; }>; }>; ` ## TokensMintedWithSignatureEventFilters Represents the filters for the "TokensMintedWithSignature" event. `type TokensMintedWithSignatureEventFilters = Partial<{ mintedTo: AbiParameterToPrimitiveType<{ indexed: true; name: "mintedTo"; type: "address"; }>; signer: AbiParameterToPrimitiveType<{ indexed: true; name: "signer"; type: "address"; }>; tokenIdMinted: AbiParameterToPrimitiveType<{ indexed: true; name: "tokenIdMinted"; type: "uint256"; }>; }>; ` ## TokensMintedWithSignatureEventFilters Represents the filters for the "TokensMintedWithSignature" event. `type TokensMintedWithSignatureEventFilters = Partial<{ mintedTo: AbiParameterToPrimitiveType<{ indexed: true; name: "mintedTo"; type: "address"; }>; signer: AbiParameterToPrimitiveType<{ indexed: true; name: "signer"; type: "address"; }>; }>; ` ## TokensOfOwnerParams Represents the parameters for the "tokensOfOwner" function. `type TokensOfOwnerParams = { owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; }; ` ##### owner `type owner = AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; ` ## TokensMintedWithSignatureEventFilters Represents the filters for the "TokensMintedWithSignature" event. `type TokensMintedWithSignatureEventFilters = Partial<{ mintedTo: AbiParameterToPrimitiveType<{ indexed: true; name: "mintedTo"; type: "address"; }>; signer: AbiParameterToPrimitiveType<{ indexed: true; name: "signer"; type: "address"; }>; tokenIdMinted: AbiParameterToPrimitiveType<{ indexed: true; name: "tokenIdMinted"; type: "uint256"; }>; }>; ` ## TotalSupplyParams Represents the parameters for the "totalSupply" function. `type TotalSupplyParams = { id: AbiParameterToPrimitiveType<{ name: "id"; type: "uint256" }>; }; ` ##### id `type id = AbiParameterToPrimitiveType<{ name: "id"; type: "uint256"; }>; ` ## TransactionButtonProps Props for the [TransactionButton](https://portal.thirdweb.com/references/typescript/v5/TransactionButton) component. `type TransactionButtonProps = { children: React.ReactNode; className?: string; disabled?: boolean; gasless?: [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); onClick?: () => void; onError?: (error: Error) => void; onTransactionConfirmed?: (receipt: TransactionReceipt) => void; onTransactionSent?: ( transactionResult: [WaitForReceiptOptions](https://portal.thirdweb.com/references/typescript/v5/WaitForReceiptOptions), ) => void; payModal?: [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); style?: React.CSSProperties; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); transaction: () => | [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) | Promise<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; type?: HTMLButtonElement["type"]; unstyled?: boolean; }; ` ##### children The `React.ReactNode` to be rendered inside the button `type children = React.ReactNode; ` ##### className The className to apply to the button element for custom styling `type className = string; ` ##### disabled The button's disabled state `type disabled = boolean; ` ##### gasless Configuration for gasless transactions. Refer to [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions) for more details. `type gasless = [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); ` ##### onClick ##### Signature `function onClick(): void; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onError ##### Signature `function onError(error: Error): void; ` ##### Parameters ##### error The `Error` object thrown ###### Type `let error: Error; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onTransactionConfirmed ##### Signature `function onTransactionConfirmed(receipt: TransactionReceipt): void; ` ##### Parameters ##### receipt The transaction receipt object of type [TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt) ###### Type `let receipt: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onTransactionSent ##### Signature `function onTransactionSent( transactionResult: [WaitForReceiptOptions](https://portal.thirdweb.com/references/typescript/v5/WaitForReceiptOptions), ): void; ` ##### Parameters ##### transactionResult The object of type [WaitForReceiptOptions](https://portal.thirdweb.com/references/typescript/v5/WaitForReceiptOptions) ###### Type `let transactionResult: Prettify< SendTransactionResult & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; } >; ` ##### Returns ##### Return Type `let returnType: void; ` ##### payModal Configuration for the "Pay Modal" that opens when the user doesn't have enough funds to send a transaction. Set `payModal: false` to disable the "Pay Modal" popup This configuration object includes the following properties to configure the "Pay Modal" UI: #### `locale` The language to use for the "Pay Modal" UI. Defaults to `"en_US"` . #### `supportedTokens` An object of type [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens) to configure the tokens to show for a chain. #### `theme` The theme to use for the "Pay Modal" UI. Defaults to `"dark"` . It can be set to `"light"` or `"dark"` or an object of type [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) for a custom theme. Refer to [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme) helper functions to use the default light or dark theme and customize it. `type payModal = [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); ` ##### style The style to apply to the button element for custom styling `type style = React.CSSProperties; ` ##### theme The theme to use for the button `type theme = "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ##### transaction ##### Signature `function transaction(): | [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) | Promise<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; ` ##### Returns ##### Return Type `let returnType: | [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) | Promise<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; ` ##### type Set the type attribute of the button element. [ MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/type) `type type = HTMLButtonElement["type"]; ` ##### unstyled Remove all default styling from the button `type unstyled = boolean; ` ## TranasctionOptions `type TranasctionOptions = { mode: "transaction"; transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); }; ` ##### mode `type mode = "transaction"; ` ##### transaction The transaction to be executed. `type transaction = [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ## TransferAndChangeRecoveryParams Represents the parameters for the "transferAndChangeRecovery" function. `type TransferAndChangeRecoveryParams = WithOverrides<{ deadline: AbiParameterToPrimitiveType<{ name: "deadline"; type: "uint256"; }>; recovery: AbiParameterToPrimitiveType<{ name: "recovery"; type: "address"; }>; sig: AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes" }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; }>; ` ## TransferBatchEventFilters Represents the filters for the "TransferBatch" event. `type TransferBatchEventFilters = Partial<{ _from: AbiParameterToPrimitiveType<{ indexed: true; name: "_from"; type: "address"; }>; _operator: AbiParameterToPrimitiveType<{ indexed: true; name: "_operator"; type: "address"; }>; _to: AbiParameterToPrimitiveType<{ indexed: true; name: "_to"; type: "address"; }>; }>; ` ## TransactionReceipt `type TransactionReceipt< quantity = bigint, index = number, status = "success" | "reverted", type = TransactionType, > = { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` ##### blobGasPrice The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844. `type blobGasPrice = quantity; ` ##### blobGasUsed The amount of blob gas used. Only specified for blob transactions as defined by EIP-4844. `type blobGasUsed = quantity; ` ##### blockHash Hash of block containing this transaction `type blockHash = Hash; ` ##### blockNumber Number of block containing this transaction `type blockNumber = quantity; ` ##### contractAddress Address of new contract or `null` if no contract was created `type contractAddress = Address | null | undefined; ` ##### cumulativeGasUsed Gas used by this and all preceding transactions in this block `type cumulativeGasUsed = quantity; ` ##### effectiveGasPrice Pre-London, it is equal to the transaction's gasPrice. Post-London, it is equal to the actual gas price paid for inclusion. `type effectiveGasPrice = quantity; ` ##### from Transaction sender `type from = Address; ` ##### gasUsed Gas used by this transaction `type gasUsed = quantity; ` ##### logs List of log objects generated by this transaction `type logs = Array>; ` ##### logsBloom Logs bloom filter `type logsBloom = Hex; ` ##### root The post-transaction state root. Only specified for transactions included before the Byzantium upgrade. `type root = Hash; ` ##### status `success` if this transaction was successful or `reverted` if it failed `type status = status; ` ##### to Transaction recipient or `null` if deploying a contract `type to = Address | null; ` ##### transactionHash Hash of this transaction `type transactionHash = Hash; ` ##### transactionIndex Index of this transaction in the block `type transactionIndex = index; ` ##### type Transaction type `type type = type; ` ## SiweAuthOptions Options for Setting up SIWE (Sign in with Ethereum) Authentication `type SiweAuthOptions = { doLogin: (params: [VerifyLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadParams)) => Promise; doLogout: () => Promise; getLoginPayload: (params: { address: string; chainId: number; }) => Promise<[LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload)>; isLoggedIn: (address: string) => Promise; }; ` ##### doLogin ##### Signature `function doLogin(params: [VerifyLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadParams)): Promise; ` ##### Parameters ##### params ###### Type `let params: { payload: [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); signature: string }; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### doLogout ##### Signature `function doLogout(): Promise; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### getLoginPayload ##### Signature `function getLoginPayload(params: { address: string; chainId: number; }): Promise<[LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload)>; ` ##### Parameters ##### params The parameters to get the login payload for. ###### Type `let params: { address: string; chainId: number }; ` ##### Returns ##### Return Type `let returnType: { address: string; chain_id?: string; domain: string; expiration_time: string; invalid_before: string; issued_at: string; nonce: string; resources?: Array; statement: string; uri?: string; version: string; }; ` ##### isLoggedIn ##### Signature `function isLoggedIn(address: string): Promise; ` ##### Parameters ##### address ###### Type `let address: string; ` ##### Returns ##### Return Type `let returnType: Promise; ` ## TransferEventFilters Represents the filters for the "Transfer" event. `type TransferEventFilters = Partial<{ from: AbiParameterToPrimitiveType<{ indexed: true; name: "from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ indexed: true; name: "to"; type: "address"; }>; }>; ` ## TransferBatchParams Represents the parameters for a batch transfer operation. `type TransferBatchParams = Prettify<{ batch: Array< { to: string } & ( | { amount: number | string } | { amountWei: bigint } ) >; }>; ` ## TransferEventFilters Represents the filters for the "Transfer" event. `type TransferEventFilters = Partial<{ from: AbiParameterToPrimitiveType<{ indexed: true; name: "from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ indexed: true; name: "to"; type: "address"; }>; tokenId: AbiParameterToPrimitiveType<{ indexed: true; name: "tokenId"; type: "uint256"; }>; }>; ` ## TransactionButton TransactionButton component is used to render a button that triggers a transaction. It shows a "Switch Network" button if the connected wallet is on a different chain than the transaction. ### Example #### Basic usage ` {}} onTransactionConfirmed={handleSuccess} onError={handleError} > Confirm Transaction ; ` #### Customize the styling by passing the `unstyled` prop and your inline styles and/or classes: ` {}} unstyled className="bg-white text-black rounded-md p-4 flex items-center justify-center" > Confirm Transaction ; ` #### Handle errors ` ...} onError={(err) => { alert(err.message); // Add your own logic here }} > Confirm Transaction ` #### Alert when a transaction is sent ` ...} onTransactionSent={(tx) => { alert("transaction sent!"); // Add your own logic here. For example, a toast }} > Confirm Transaction ` #### Alert when a transaction is completed ` ...} onTransactionConfirmed={(tx) => { alert("transaction sent!"); console.log(tx); // Add your own logic here. For example, a toast }} > Confirm Transaction ` #### The onClick prop, if provided, will be called before the transaction is sent. ` alert("Transaction is about to be sent")} transaction={...} > ... ` #### Attach custom Pay metadata ` ... ; ` #### Gasless usage with [ thirdweb Engine](https://portal.thirdweb.com/engine) ` ... ; ` #### Gasless usage with OpenZeppelin ` ... ; ` ##### Signature `function TransactionButton(props: [TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps)): Element; ` ### Parameters ##### props The props for this component. Refer to [ TransactionButtonProps](https://portal.thirdweb.com/references/typescript/v5/TransactionButtonProps) for details. #### Type `let props: { children: React.ReactNode; className?: string; disabled?: boolean; gasless?: [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); onClick?: () => void; onError?: (error: Error) => void; onTransactionConfirmed?: (receipt: TransactionReceipt) => void; onTransactionSent?: ( transactionResult: [WaitForReceiptOptions](https://portal.thirdweb.com/references/typescript/v5/WaitForReceiptOptions), ) => void; payModal?: [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); style?: React.CSSProperties; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); transaction: () => | [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) | Promise<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; type?: HTMLButtonElement["type"]; unstyled?: boolean; }; ` ### Returns ##### Return Type `let returnType: Element; ` ## TransferForParams Represents the parameters for the "transferFor" function. `type TransferForParams = WithOverrides<{ from: AbiParameterToPrimitiveType<{ name: "from"; type: "address"; }>; fromDeadline: AbiParameterToPrimitiveType<{ name: "fromDeadline"; type: "uint256"; }>; fromSig: AbiParameterToPrimitiveType<{ name: "fromSig"; type: "bytes"; }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; toDeadline: AbiParameterToPrimitiveType<{ name: "toDeadline"; type: "uint256"; }>; toSig: AbiParameterToPrimitiveType<{ name: "toSig"; type: "bytes"; }>; }>; ` ## TransferFromParams Represents the parameters for the `transferFrom` function. `type TransferFromParams = Prettify< WithOverrides< { from: Address; to: Address } & ( | { amount: number | string } | { amountWei: bigint } ) > >; ` ## TransferFromParams Represents the parameters for the "transferFrom" function. `type TransferFromParams = WithOverrides<{ from: AbiParameterToPrimitiveType<{ name: "from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }>; ` ## TransferOwnershipParams Represents the parameters for the "transferOwnership" function. `type TransferOwnershipParams = WithOverrides<{ newOwner: AbiParameterToPrimitiveType<{ name: "newOwner"; type: "address"; }>; }>; ` ## TransferParams Represents the parameters for the "transfer" function. `type TransferParams = WithOverrides<{ deadline: AbiParameterToPrimitiveType<{ name: "deadline"; type: "uint256"; }>; sig: AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes" }>; to: AbiParameterToPrimitiveType<{ name: "to"; type: "address" }>; }>; ` ## TryAggregateParams Represents the parameters for the "tryAggregate" function. `type TryAggregateParams = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; requireSuccess: AbiParameterToPrimitiveType<{ name: "requireSuccess"; type: "bool"; }>; }>; ` ## TransferParams Represents the parameters for a transfer operation. `type TransferParams = Prettify< WithOverrides< { to: string } & ( | { amount: number | string } | { amountWei: bigint } ) > >; ` ## TransferSingleEventFilters Represents the filters for the "TransferSingle" event. `type TransferSingleEventFilters = Partial<{ _from: AbiParameterToPrimitiveType<{ indexed: true; name: "_from"; type: "address"; }>; _operator: AbiParameterToPrimitiveType<{ indexed: true; name: "_operator"; type: "address"; }>; _to: AbiParameterToPrimitiveType<{ indexed: true; name: "_to"; type: "address"; }>; }>; ` ## TryBlockAndAggregateParams Represents the parameters for the "tryBlockAndAggregate" function. `type TryBlockAndAggregateParams = WithOverrides<{ calls: AbiParameterToPrimitiveType<{ components: [ { name: "target"; type: "address" }, { name: "callData"; type: "bytes" }, ]; name: "calls"; type: "tuple[]"; }>; requireSuccess: AbiParameterToPrimitiveType<{ name: "requireSuccess"; type: "bool"; }>; }>; ` ## UninstallModuleByProxyOptions `` type UninstallModuleByProxyOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleProxyAddress: string; }; `` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### moduleData `` type moduleData = `0x${string}`; `` ##### moduleProxyAddress `type moduleProxyAddress = string; ` ## UninstallPublishedModuleOptions `` type UninstallPublishedModuleOptions = { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleName: string; publisherAddress?: string; version?: string; }; `` ##### contract `type contract = [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); ` ##### moduleData `` type moduleData = `0x${string}`; `` ##### moduleName `type moduleName = string; ` ##### publisherAddress `type publisherAddress = string; ` ##### version `type version = string; ` ## UninstallModuleParams Represents the parameters for the "uninstallModule" function. `type UninstallModuleParams = WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "data"; type: "bytes" }>; moduleContract: AbiParameterToPrimitiveType<{ name: "moduleContract"; type: "address"; }>; }>; ` ## UnpinOptions `type UnpinOptions = { cid: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ##### cid `type cid = string; ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ## UnpublishContractParams Represents the parameters for the "unpublishContract" function. `type UnpublishContractParams = WithOverrides<{ contractId: AbiParameterToPrimitiveType<{ name: "contractId"; type: "string"; }>; publisher: AbiParameterToPrimitiveType<{ name: "publisher"; type: "address"; }>; }>; ` ## UpdateMetadataParams `type UpdateMetadataParams = { newMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); targetTokenId: bigint; }; ` ##### newMetadata `type newMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ##### targetTokenId `type targetTokenId = bigint; ` ## UpdateListingParams `type UpdateListingParams = { assetContractAddress?: Address; currencyContractAddress?: Address; endTimestamp?: Date; isReservedListing?: boolean; listingId: bigint; quantity?: bigint; startTimestamp?: Date; tokenId?: bigint; } & ({ pricePerToken: string } | { pricePerTokenWei: string }); ` ## UpdateMetadataParams `type UpdateMetadataParams = { newMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); targetTokenId: bigint; }; ` ##### newMetadata `type newMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ##### targetTokenId `type targetTokenId = bigint; ` ## UpdateQuorumNumeratorParams Represents the parameters for the "updateQuorumNumerator" function. `type UpdateQuorumNumeratorParams = WithOverrides<{ newQuorumNumerator: AbiParameterToPrimitiveType<{ name: "newQuorumNumerator"; type: "uint256"; }>; }>; ` ## UpdateTokenURIParams `type UpdateTokenURIParams = { newMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); tokenId: bigint; }; ` ##### newMetadata `type newMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ##### tokenId `type tokenId = bigint; ` ## UpdatedListingEventFilters Represents the filters for the "UpdatedListing" event. `type UpdatedListingEventFilters = Partial<{ assetContract: AbiParameterToPrimitiveType<{ indexed: true; name: "assetContract"; type: "address"; }>; listingCreator: AbiParameterToPrimitiveType<{ indexed: true; name: "listingCreator"; type: "address"; }>; listingId: AbiParameterToPrimitiveType<{ indexed: true; name: "listingId"; type: "uint256"; }>; }>; ` ## UploadMetadataParams `type UploadMetadataParams = { metadatas: Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string> }; ` ##### metadatas `type metadatas = Array<[NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) | string>; ` ## UpdateTokenURIParams `type UpdateTokenURIParams = { newMetadata: [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); tokenId: bigint; }; ` ##### newMetadata `type newMetadata = [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput); ` ##### tokenId `type tokenId = bigint; ` ## UseBlockNumberOptions `type UseBlockNumberOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); enabled?: boolean; watch?: boolean; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### enabled `type enabled = boolean; ` ##### watch `type watch = boolean; ` ## UriParams Represents the parameters for the "uri" function. `type UriParams = { tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; }; ` ##### tokenId `type tokenId = AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; ` ## UseConnectModalOptions Options for configuring Connect Modal for [useConnectModal](https://portal.thirdweb.com/references/typescript/v5/useConnectModal) hook `type UseConnectModalOptions = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); privacyPolicyUrl?: string; recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; setActive?: boolean; showAllWallets?: boolean; showThirdwebBranding?: boolean; size?: "compact" | "wide"; termsOfServiceUrl?: string; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); title?: string; titleIcon?: string; walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; welcomeScreen?: [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); }; ` ##### accountAbstraction Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options. This allows to sponsor gas fees for your user's transaction using the thirdweb account abstraction infrastructure. `* function Example() { const { connect } = useConnectModal(); async function handleConnect() { await connect({ client, accountAbstraction: { factoryAddress: "0x123...", chain: sepolia, sponsorGas: true } }) } return ( ) } ` `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### appMetadata Metadata of the app that will be passed to connected wallet. Setting this is highly recommended. Some wallets display this information to the user when they connect to your app. `type appMetadata = AppMetadata; ` ### Example `{ name: "My App", url: "https://my-app.com", description: "some description about your app", logoUrl: "https://path/to/my-app/logo.svg", }; ` ##### auth Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to enforce the users to sign a message after connecting their wallet to authenticate themselves. Refer to the [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details `type auth = [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); ` ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet. If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it. This ensures that the wallet is connected to the correct blockchain before interacting with your app. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### chains Array of chains that your app supports. This is only relevant if your app is a multi-chain app and works across multiple blockchains. If your app only works on a single blockchain, you should only specify the `chain` prop. Given list of chains will be sent to wallet at the time of connection if the wallet supports requesting multiple chains ( example: WalletConnect ) so that users can switch between the chains post connection easily You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `import { defineChain } from "thirdweb/react"; const polygon = defineChain({ id: 137, }); ` `type chains = Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### locale By default - Connect Modal UI uses the `en-US` locale for english language users. You can customize the language used in the Connect Modal UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### privacyPolicyUrl URL of the "privacy policy" page If provided, Modal will show a Privacy Policy message at the bottom with below link `type privacyPolicyUrl = string; ` ##### recommendedWallets Wallets to show as recommended in the Connect Modal `type recommendedWallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ##### setActive Whether to set the connected wallet as active wallet or not By default, It is set to `true` You can set it to `false` and use the retunred wallet from the `connect` method if you want to connect wallet without setting it as active wallet `type setActive = boolean; ` ### Example `function Example() { const { connect } = useConnectModal(); return ( ); } ` ##### showAllWallets By default, Connect modal shows a "All Wallets" button that shows a list of 500+ wallets. You can disable this button by setting `showAllWallets` prop to `false` `type showAllWallets = boolean; ` ##### showThirdwebBranding By default Connect Modal shows "Powered by Thirdweb" branding at the bottom of the Modal. If you want to hide the branding, set this prop to `false` `type showThirdwebBranding = boolean; ` ##### size Set the size of the connect modal on desktop - `"compact"` or `"wide"` Modal size is always `compact` on mobile By default it is `"wide"` for desktop. `type size = "compact" | "wide"; ` ##### termsOfServiceUrl URL of the "terms of service" page If provided, Modal will show a Terms of Service message at the bottom with below link `type termsOfServiceUrl = string; ` ##### theme Set the theme for the Connect Modal. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); ` ##### title Title to show in Connect Modal The default is `"Connect"` `type title = string; ` ##### titleIcon Replace the default thirdweb icon next to Modal title with your own icon Set to empty string (`""` ) to hide the icon `type titleIcon = string; ` ##### walletConnect Configure options for WalletConnect By default WalletConnect uses the thirdweb's default project id. Setting your own project id is recommended. You can create a project id by signing up on [ walletconnect.com](https://walletconnect.com/) `type walletConnect = { projectId?: string }; ` ##### wallets Array of supported wallets. If not provided, default wallets will be used. `type wallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ### Example `import { AutoConnect } from "thirdweb/react"; import { createWallet, inAppWallet } from "thirdweb/wallets"; const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), ]; function Example() { const { connect } = useConnectModal(); return ( ); } ` If no wallets are specified. The component will show All the EIP-6963 compliant installed wallet extensions, as well as below default wallets: `const defaultWallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), createWallet("io.zerion.wallet"), ]; ` Connect Modal also shows a "All wallets" button at the end of wallet list which allows user to connect to any of the 500+ wallets ##### welcomeScreen Customize the welcome screen. This prop is only applicable when modal size prop is set to "wide". On "wide" Modal size, a welcome screen is shown on the right side of the modal. This screen can be customized in two ways ##### 1\. Customize Metadata and Image `const welcomeScreen = { title: "your title", subtitle: "your subtitle", img: { src: "https://your-image-url.png", width: 300, height: 50, }, }; ` ##### 2\. Render Custom Component `const welcomeScreen = () => ; ` `type welcomeScreen = [WelcomeScreen](https://portal.thirdweb.com/references/typescript/v5/WelcomeScreen); ` ## UseNetworkSwitcherModalOptions Options for the `useNetworkSwitcherModal` hook's returned `open` function `type UseNetworkSwitcherModalOptions = { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); onCustomClick?: () => void; onSwitch?: (chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)) => void; renderChain?: React.FC; sections?: Array; theme?: [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) | "dark" | "light"; }; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### locale By default - NetworkSwitcher UI uses the `en-US` locale for english language users. You can customize the language used in the ConnectButton UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### onCustomClick ##### Signature `function onCustomClick(): void; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onSwitch ##### Signature `function onSwitch(chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)): void; ` ##### Parameters ##### chain The `Chain` of the chain that was switched to ###### Type `let chain: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### Returns ##### Return Type `let returnType: void; ` ##### renderChain Override how the chain button is rendered in the Modal `type renderChain = React.FC; ` ##### sections Specify sections of chains to be displayed in the Network Selector Modal `type sections = Array; ` ### Example To display "Polygon", "Avalanche" chains under "Recently used" section and "Ethereum", "Arbitrum" chains under "Popular" section, you can set the prop with the following value `import { arbitrum, base, ethereum, polygon } from "thirdweb/chains"; const sections = [ { label: "Recently used", chains: [arbitrum, polygon] }, { label: "Popular", chains: [base, ethereum] }, ]; ` ##### theme Set the theme for the `NetworkSwitcher` Modal. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme) | "dark" | "light"; ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); ` ## UseWalletDetailsModalOptions `type UseWalletDetailsModalOptions = { assetTabs?: Array; chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectedAccountAvatarUrl?: string; connectedAccountName?: React.ReactNode; connectOptions?: DetailsModalConnectOptions; displayBalanceToken?: Record; footer?: (props: { close: () => void }) => JSX.Element; hideBuyFunds?: boolean; hideDisconnect?: boolean; hideReceiveFunds?: boolean; hideSendFunds?: boolean; hideSwitchWallet?: boolean; locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); networkSelector?: [NetworkSelectorProps](https://portal.thirdweb.com/references/typescript/v5/NetworkSelectorProps); onClose?: (screen: string) => void; onDisconnect?: (info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) }) => void; payOptions?: Extract<[PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions), { mode?: "fund_wallet" }>; showBalanceInFiat?: SupportedFiatCurrency; showTestnetFaucet?: boolean; supportedNFTs?: SupportedNFTs; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); theme?: "light" | "dark" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); }; ` ##### assetTabs When you click on "View Assets", by default the "Tokens" tab is shown first. If you want to show the "NFTs" tab first, change the order of the asset tabs to: \["nft", "token"\] Note: If an empty array is passed, the \[View Funds\] button will be hidden `type assetTabs = Array; ` ##### chains Array of chains that your app supports. They will be displayed in the network selector in the screen. This is only relevant if your app is a multi-chain app and works across multiple blockchains. If your app only works on a single blockchain, you should only specify the `chain` prop. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `import { defineChain } from "thirdweb/react"; const polygon = defineChain({ id: 137, }); ` `type chains = Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### connectedAccountAvatarUrl Use custom avatar URL for the connected wallet image in the `ConnectButton` Details Modal, overriding ENS avatar or Blobbie icon. `type connectedAccountAvatarUrl = string; ` ##### connectedAccountName Render custom UI for the connected wallet name in the `ConnectButton` Details Modal, overriding ENS name or wallet address. `type connectedAccountName = React.ReactNode; ` ##### connectOptions Options to configure the Connect UI shown when user clicks the "Connect Wallet" button in the Wallet Switcher screen. `type connectOptions = DetailsModalConnectOptions; ` ##### displayBalanceToken Display the balance of a token instead of the native token `type displayBalanceToken = Record; ` ### Example `const displayBalanceToken = { // show USDC balance when connected to Ethereum mainnet or Polygon [ethereum.id]: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", [polygon.id]: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", }; ` ##### footer ##### Signature `function footer(props: { close: () => void }): JSX.Element; ` ##### Parameters ##### props ###### Type `let props: { close: () => void }; ` ##### Returns ##### Return Type `let returnType: JSX.Element; ` ##### hideBuyFunds Hide the "Buy Funds" button in the Details Modal. By default the "Buy Funds" button is shown. `type hideBuyFunds = boolean; ` ##### hideDisconnect Hide the "Disconnect Wallet" button in the Wallet Details Modal. By default it is `false` `type hideDisconnect = boolean; ` ##### hideReceiveFunds Hide the "Receive Funds" button in the Details Modal. By default the "Receive Funds" button is shown. `type hideReceiveFunds = boolean; ` ##### hideSendFunds Hide the "Send Funds" button in the Details Modal. By default the "Send Funds" button is shown. `type hideSendFunds = boolean; ` ##### hideSwitchWallet Hide the "Switch Wallet" button in the Wallet Details Modal. By default it is `false` `type hideSwitchWallet = boolean; ` ##### locale By default - Details Modal UI uses the `en-US` locale for english language users. You can customize the language used in the Details Modal UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### networkSelector customize the Network selector shown in the Wallet Details Modal `type networkSelector = [NetworkSelectorProps](https://portal.thirdweb.com/references/typescript/v5/NetworkSelectorProps); ` ##### onClose ##### Signature `function onClose(screen: string): void; ` ##### Parameters ##### screen The name of the screen that was being shown when user closed the modal ###### Type `let screen: string; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onDisconnect ##### Signature `function onDisconnect(info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }): void; ` ##### Parameters ##### info ###### Type `let info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### payOptions Configure options for thirdweb Pay. thirdweb Pay allows users to buy tokens using crypto or fiat currency. `type payOptions = Extract<[PayUIOptions](https://portal.thirdweb.com/references/typescript/v5/PayUIOptions), { mode?: "fund_wallet" }>; ` ##### showBalanceInFiat Show the token balance's value in fiat. Note: Not all tokens are resolvable to a fiat value. In that case, nothing will be shown. `type showBalanceInFiat = SupportedFiatCurrency; ` ##### showTestnetFaucet Show a "Request Testnet funds" link in Wallet Details Modal when user is connected to a testnet. By default it is `false` , If you want to show the "Request Testnet funds" link when user is connected to a testnet, set this prop to `true` `type showTestnetFaucet = boolean; ` ##### supportedNFTs Customize the NFTs shown in the "View Funds" screen in Details Modal for various networks. By default, The "View Funds" screen shows a few popular tokens for default chains and the native token. For other chains it only shows the native token. `type supportedNFTs = SupportedNFTs; ` ### Example supportedTokens prop allows you to customize this list as shown below which shows "Pudgy Penguins" when a users wallet is connected to Ethereum mainnet. `import { ConnectButton } from "thirdweb/react"; function Example() { return ( ); } ` ##### supportedTokens Customize the tokens shown in the "Send Funds" screen in Details Modal for various networks. By default, The "Send Funds" screen shows a few popular tokens for default chains and the native token. For other chains it only shows the native token. `type supportedTokens = [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); ` ### Example supportedTokens prop allows you to customize this list as shown below which shows "Dai Stablecoin" when users wallet is connected to the "Base" mainnet. `import { useWalletDetailsModal } from "thirdweb/react"; function Example() { const detailsModal = useWalletDetailsModal(); function handleClick() { detailsModal.open({ client, supportedTokens: { 84532: [ { address: "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb", // token contract address name: "Dai Stablecoin", symbol: "DAI", icon: "https://assets.coingecko.com/coins/images/9956/small/Badge_Dai.png?1687143508", }, ], }, }); } return ; } ` ##### theme Set the theme for the Wallet Details Modal. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = "light" | "dark" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); ` ## UserOperation `type UserOperation = { callData: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); callGasLimit: bigint; initCode: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: bigint; paymasterAndData: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); preVerificationGas: bigint; sender: ox__Address.Address; signature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); verificationGasLimit: bigint; }; ` ##### callData `type callData = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### callGasLimit `type callGasLimit = bigint; ` ##### initCode `type initCode = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### maxFeePerGas `type maxFeePerGas = bigint; ` ##### maxPriorityFeePerGas `type maxPriorityFeePerGas = bigint; ` ##### nonce `type nonce = bigint; ` ##### paymasterAndData `type paymasterAndData = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### preVerificationGas `type preVerificationGas = bigint; ` ##### sender `type sender = ox__Address.Address; ` ##### signature `type signature = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### verificationGasLimit `type verificationGasLimit = bigint; ` ## VerifyEOASignatureParams `type VerifyEOASignatureParams = { address: string; message: string | Message; signature: string | Uint8Array; }; ` ##### address `type address = string; ` ##### message `type message = string | Message; ` ##### signature `type signature = string | Uint8Array; ` ## VerifyLoginPayloadResult `type VerifyLoginPayloadResult = | { payload: VerifiedLoginPayload; valid: true } | { error: string; valid: false }; ` ## VerifyContractWalletSignatureParams `type VerifyContractWalletSignatureParams = Prettify< [VerifyEOASignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyEOASignatureParams) & { accountFactory?: { address: string; verificationCalldata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } >; ` ## VerifyFidSignatureParams Represents the parameters for the "verifyFidSignature" function. `type VerifyFidSignatureParams = { custodyAddress: AbiParameterToPrimitiveType<{ name: "custodyAddress"; type: "address"; }>; digest: AbiParameterToPrimitiveType<{ name: "digest"; type: "bytes32"; }>; fid: AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256" }>; sig: AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes" }>; }; ` ##### custodyAddress `type custodyAddress = AbiParameterToPrimitiveType<{ name: "custodyAddress"; type: "address"; }>; ` ##### digest `type digest = AbiParameterToPrimitiveType<{ name: "digest"; type: "bytes32"; }>; ` ##### fid `type fid = AbiParameterToPrimitiveType<{ name: "fid"; type: "uint256"; }>; ` ##### sig `type sig = AbiParameterToPrimitiveType<{ name: "sig"; type: "bytes"; }>; ` ## VerifyLoginPayloadParams `type VerifyLoginPayloadParams = { payload: [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); signature: string; }; ` ##### payload `type payload = [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); ` ##### signature `type signature = string; ` ## VerifyTypedDataParams `type VerifyTypedDataParams< typedData extends | ox__TypedData.TypedData | Record = ox__TypedData.TypedData, primaryType extends | keyof typedData | "EIP712Domain" = keyof typedData, > = Omit & ox__TypedData.Definition & { accountFactory?: { address: string; verificationCalldata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; address: string; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); signature: string | Uint8Array | ox__Signature.Signature; }; ` ## WCAutoConnectOptions `type WCAutoConnectOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); savedConnectParams?: SavedConnectParams; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### savedConnectParams `type savedConnectParams = SavedConnectParams; ` ## VoteType `enum VoteType { abstain, against, for, } ` #### abstain `2; ` #### against `0; ` #### for `1; ` ## WCConnectOptions `type WCConnectOptions = { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); walletConnect?: Prettify< WalletConnectConfig & { onDisplayUri?: (_uri: string) => void; optionalChains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; pairingTopic?: string; qrModalOptions?: WalletConnectQRCodeModalOptions; showQrModal?: boolean; } >; }; ` ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet. If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it. This ensures that the wallet is connected to the correct blockchain before interacting with your app. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ### Example `import { defineChain } from "thirdweb/react"; const polygon = defineChain({ id: 137, }); await wallet.connect({ chain: polygon }); ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### walletConnect `type walletConnect = Prettify< WalletConnectConfig & { onDisplayUri?: (_uri: string) => void; optionalChains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; pairingTopic?: string; qrModalOptions?: WalletConnectQRCodeModalOptions; showQrModal?: boolean; } >; ` ## WaitForReceiptOptions `type WaitForReceiptOptions = Prettify< SendTransactionResult & { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; } >; ` ## WaitForBundleOptions `type WaitForBundleOptions = Prettify<{ bundleId: [WalletSendCallsId](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsId); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }>; ` ## WCSupportedWalletIds `type WCSupportedWalletIds = | "io.metamask" | "com.trustwallet.app" | "com.okex.wallet" | "com.bitget.web3" | "com.binance" | "org.uniswap" | "com.safepal" | "me.rainbow" | "com.bybit" | "pro.tokenpocket" | "com.ledger" | "xyz.timelesswallet" | "global.safe" | "io.zerion.wallet" | "com.robinhood.wallet" | "io.1inch.wallet" | "com.crypto.wallet" | "com.exodus" | "xyz.argent" | "im.token" | "com.blockchain" | "io.magiceden.wallet" | "com.kraken" | "app.backpack" | "com.zengo" | "com.mewwallet" | "app.phantom" | "com.fireblocks" | "org.mathwallet" | "com.alphawallet" | "com.roninchain.wallet" | "com.unstoppabledomains" | "app.keyring" | "xyz.frontier.wallet" | "app.omni" | "technology.obvious" | "com.ambire" | "com.mtpelerin" | "io.internetmoney" | "app.walletnow" | "com.bitcoin" | "io.alpha-u.wallet.web" | "com.coin98" | "io.myabcwallet" | "co.arculus" | "com.opera" | "com.chain" | "io.huddln" | "com.get-verso" | "me.haha" | "pk.modular" | "org.kelp" | "io.clingon" | "com.broearn" | "com.coinomi" | "com.ripio" | "com.sabay.wallet" | "io.tokoin" | "world.fncy" | "io.copiosa" | "com.liberawallet" | "io.certhis" | "com.burritowallet" | "io.ancrypto" | "network.cvl" | "io.cypherhq" | "app.status" | "io.enjin" | "io.trinity-tech" | "app.everspace" | "io.kriptomat" | "io.oxalus" | "org.thetatoken" | "io.leapwallet" | "finance.islamicoin" | "xyz.coca" | "com.monarchwallet" | "co.filwallet" | "com.valoraapp" | "com.coincircle" | "money.snowball" | "io.paraswap" | "network.mrhb" | "com.apollox" | "com.ennowallet" | "io.loopring.wallet" | "com.bee" | "cc.localtrade.lab" | "com.xcapit" | "io.safematrix" | "com.neonwallet" | "xyz.sequence" | "app.linen" | "io.nabox" | "net.spatium" | "com.cryptnox" | "com.rktechworks" | "pro.assure" | "trade.flooz.wallet" | "app.keplr" | "com.crossmint" | "com.pierwallet" | "app.core" | "app.keeper-wallet" | "com.dcentwallet" | "com.withpaper" | "finance.klever" | "app.edge" | "com.neftipedia" | "io.goldbit" | "com.coingrig" | "io.xfun" | "io.ricewallet" | "com.antiersolutions" | "io.okse" | "com.aktionariat" | "com.itoken" | "io.zelus" | "com.cardstack" | "com.paybolt" | "org.arianee" | "io.slavi" | "com.plasma-wallet" | "tech.defiantapp" | "cc.avacus" | "org.bytebank" | "com.coolbitx.cwsapp" | "com.optowallet" | "network.trustkeys" | "app.beewallet" | "io.ttmwallet" | "io.pltwallet" | "io.helixid" | "it.airgap" | "app.qubic.wallet" | "com.holdstation" | "com.saakuru.app" | "com.3swallet" | "com.payperless" | "digital.minerva" | "finance.voltage" | "com.lif3" | "net.shinobi-wallet" | "com.kryptogo" | "com.feralfile.app" | "com.bifrostwallet" | "com.nufinetes" | "io.wallet3" | "com.abra" | "app.imem" | "com.premanft" | "so.onekey.app.wallet" | "finance.slingshot" | "com.kriptonio" | "xyz.timelesswallet" | "xyz.ctrl" | "io.streakk" | "com.saitamatoken" | "com.flowfoundation.wallet" | "io.hippowallet" | "io.cosmostation" | "org.bitizen" | "io.blocto" | "com.humbl" | "io.passpay" | "app.ultimate" | "me.astrox" | "org.thorwallet" | "app.fizzwallet" | "org.arianee" | "app.stickey" | "com.klipwallet" | "app.coinstats" | "land.liker" | "app.krystal" | "fi.pillar" | "io.harti" | "net.stasis" | "io.novawallet" | "io.dttd" | "com.foxwallet" | "network.haqq" | "com.tomi" | "io.tradestrike" | "app.subwallet" | "tech.okto" | "app.catecoin" | "io.ukiss" | "com.tellaw" | "com.tangem" | "is.callback" | "io.summonersarena" | "co.xellar" | "io.talken" | "xyz.uniultra.wallet" | "io.ozonewallet" | "com.tiduswallet" | "world.ixo" | "xyz.coca" | "io.zelcore" | "world.dosi.vault" | "com.ullapay" | "com.ellipal" | "money.unstoppable" | "dev.auroracloud" | "zone.bitverse" | "io.konio" | "net.gateweb3" | "app.utorg" | "com.coinsdo" | "app.ammer" | "us.binance" | "co.muza" | "com.fxwallet" | "app.ryipay" | "org.dota168" | "io.altme" | "com.bitpie" | "io.moonstake" | "gg.indi" | "io.yusetoken" | "com.coininn" | "io.functionx" | "io.pockie" | "com.amazewallet" | "com.paliwallet" | "me.easy" | "live.superex" | "com.secuxtech" | "io.didwallet" | "social.halo" | "com.sinohope" | "com.ballet" | "com.opz" | "io.fizen" | "com.kresus" | "com.midoin" | "app.onto" | "com.oasys-wallet" | "org.gooddollar" | "id.competence" | "ai.spotonchain.platform" | "network.dgg" | "llc.besc" | "app.gamic" | "baby.smart" | "network.gridlock" | "app.zeal" | "com.ivirse" | "network.trustkeys" | "ch.dssecurity" | "com.concordium" | "io.zkape" | "com.thirdweb" | "io.pitaka" | "com.trusteeglobal" | "org.mugambo" | "cc.dropp" | "xyz.roam.wallet" | "world.qoin" | "com.meld.app" | "com.bestwallet" | "io.hyperpay" | "io.xucre" | "app.herewallet" | "com.cakewallet" | "io.unagi.unawallet" | "io.ethos" | "app.pluswallet" | "com.authentrend" | "finance.plena" | "com.bifrostwallet" | "com.wemix" | "com.gemwallet" | "com.caesiumlab" | "pro.fintoken" | "com.peakdefi" | "com.nodle" | "com.cryptokara" | "com.poolsmobility.wallet" | "com.veworld" | "com.azcoiner" | "technology.jambo" | "vc.uincubator.api" | "app.m1nty" | "io.noone" | "com.bitso" | "online.puzzle" | "network.blackfort" | "io.armana.portal" | "io.bharatbox" | "com.greengloryglobal" | "com.x9wallet" | "io.miraiapp" | "io.kigo" | "com.getcogni" | "com.fastex.wallet" | "io.wallacy" | "org.talkapp" | "io.zelus" | "com.usecapsule" | "com.unitywallet" | "app.sinum" | "finance.soulswap.app" | "com.shapeshift" | "finance.panaroma" | "io.neopin" | "com.alicebob" | "co.cyber.wallet" | "com.dextrade" | "com.hashpack.wallet" | "org.thepulsewallet" | "id.co.pintu" | "io.bladewallet" | "com.pandoshi" | "money.keychain" | "finance.voltage" | "com.mpcvault.broswerplugin" | "io.legacynetwork" | "io.getclave" | "me.iopay" | "app.kabila" | "one.mixin.messenger" | "com.bettatrade" | "io.scramberry" | "io.earthwallet" | "xyz.nestwallet" | "xyz.echooo" | "net.myrenegade" | "io.ready" | "ai.hacken" | "io.plutope" | "io.trustasset" | "app.dfinnwallet" | "com.bmawallet" | "net.spatium.wallet" | "io.transi" | "com.dolletwallet" | "app.wombat" | "fi.dropmate" | "pub.dg" | "com.icewal" | "one.metapro.wallet" | "xyz.bonuz" | "io.shido" | "co.lifedefi" | "fun.tobi" | "inc.tomo" | "app.clot" | "me.komet.app" | "io.guardiianwallet" | "io.wallypto" | "com.safemoon" | "com.elrond.maiar.wallet" | "co.swopme" | "com.bitpay" | "app.tofee" | "com.zypto" | "xyz.orion" | "io.uptn.dapp-web" | "io.nabox" | "io.compasswallet" | "app.nicegram" | "finance.openwallet" | "com.bitget.web3" | "com.tastycrypto" | "com.ipmb" | "com.daffione" | "io.owallet" | "com.beexo" | "com.webauth" | "id.plumaa" | "social.gm2" | "nl.greenhood.wallet" | "com.companyname.swaptobe" | "finance.porta" | "org.alephium" | "network.over" | "io.walletverse" | "com.berasig" | "org.shefi" | "com.wemixplay" | "co.family.wallet" | "io.legionnetwork" | "com.bitnovo" | "io.safecryptowallet" | "ag.jup" | "io.koalawallet" | "io.nonbank" | "io.universaleverything"; ` ## Wallet Wallet interface `type Wallet = { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### getAdminAccount ##### Signature `function getAdminAccount(): [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; ` ##### Returns ##### Return Type `let returnType: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; ` ##### getConfig ##### Signature `function getConfig(): [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; ` ##### Returns ##### Return Type `let returnType: [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; ` ##### id Unique identifier of the wallet For example, MetaMask wallet id is `"io.metamask"` `type id = TWalletId; ` ### Example `const wallet = createWallet("io.metamask"); console.log(wallet.id); // "io.metamask" ` ##### onConnectRequested ##### Signature `function onConnectRequested(): Promise; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### subscribe Subscribe to wallet for certain events like `chainChanged` , `accountChanged` , `disconnect` , etc. `type subscribe = [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; ` ### Example `wallet.subscribe("chainChanged", (chain) => { console.log("wallet is now connected to network:", chain); }); wallet.subscribe("accountChanged", (account) => { console.log("wallet is now connected to account:", account); }); wallet.subscribe("disconnect", () => { console.log("wallet is disconnected"); }); ` ##### autoConnect Re-connect the wallet automatically without prompting the user for connection. This is useful to automatically connect the wallet if it was already connected in the past to reconnect wallet when user re-visits the website after some time or refreshes the page. ##### Signature `function autoConnect( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ): Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; ` ##### Parameters ##### options Options to auto-connect the wallet ###### Type `let options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption); ` ##### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` ##### connect Prompt the user to connect the wallet. ##### Signature `function connect( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ): Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; ` ##### Parameters ##### options Options to connect the wallet. Depending on the wallet id, The options can be different. ###### Type `let options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption); ` ##### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` ##### disconnect Disconnect the wallet ##### Signature `function disconnect(): Promise; ` ##### Returns ##### Return Type `let returnType: Promise; ` ##### getAccount Get the [Account](https://portal.thirdweb.com/references/typescript/v5/Account) object that the wallet is currently connected to. If the wallet is not connected, it returns `undefined` . Refer to [ Account vs Wallet](https://portal.thirdweb.com/typescript/v5/wallets) to understand the difference between `Account` and `Wallet` interface ##### Example `const account = wallet.getAccount(); ` ##### Signature `function getAccount(): undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### Returns ##### Return Type `let returnType: undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### getChain Get the [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the network that the wallet is currently connected to. If the wallet is not connected, it returns `undefined` . ##### Example `const chain = wallet.getChain(); ` ##### Signature `function getChain(): | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### Returns ##### Return Type `let returnType: undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### switchChain Switch the wallet to a different network by passing the [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the network ##### Signature `function switchChain(chain: Readonly): Promise; ` ##### Parameters ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the network to switch to. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. ###### Type `let chain: Readonly; ` ##### Returns ##### Return Type `let returnType: Promise; ` ## WalletCallReceipt `type WalletCallReceipt = { blockHash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); blockNumber: quantity; gasUsed: quantity; logs: Array<{ address: string; data: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); topics: Array<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)> }>; status: status; transactionHash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); }; ` ##### blockHash `type blockHash = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ##### blockNumber `type blockNumber = quantity; ` ##### gasUsed `type gasUsed = quantity; ` ##### logs `type logs = Array<{ address: string; data: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); topics: Array<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)> }>; ` ##### status `type status = status; ` ##### transactionHash `type transactionHash = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); ` ## WalletAutoConnectionOption Generic type for getting the type of object that the `wallet.autoConnect` method takes as the first argument. `type WalletAutoConnectionOption = T extends "walletConnect" ? [WCAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCAutoConnectOptions) : T extends "smart" ? [SmartWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletConnectionOptions) : T extends "inApp" | "embedded" ? [InAppWalletAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletAutoConnectOptions) : T extends typeof COINBASE ? | [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) | [CoinbaseSDKWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/CoinbaseSDKWalletConnectionOptions) : T extends [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds) & [WCSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/WCSupportedWalletIds) ? [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) | [WCAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCAutoConnectOptions) : T extends [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds) ? [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) : T extends EcosystemWalletId ? [EcosystemWalletAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletAutoConnectOptions) : [WCAutoConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCAutoConnectOptions); ` ### Example `type X = WalletAutoConnectionOption<"io.metamask">; ` ## WalletCapabilitiesRecord `type WalletCapabilitiesRecord< capabilities extends [WalletCapabilities](https://portal.thirdweb.com/references/typescript/v5/WalletCapabilities), id extends string | number = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex), > = { [chain in id]: capabilities } & { message?: string }; ` ## WalletConnectSession `type WalletConnectSession = { origin?: string; topic: string }; ` ##### origin `type origin = string; ` ##### topic `type topic = string; ` ## WalletCreationOptions Generic type for getting the type of object that the `createWallet` function takes as the second argument. ( the first argument being the wallet id ) `type WalletCreationOptions = T extends "smart" ? [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) : T extends "inApp" | "embedded" ? [InAppWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions) : T extends typeof COINBASE ? [CoinbaseWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/CoinbaseWalletCreationOptions) : T extends "adapter" ? [AdapterWalletOptions](https://portal.thirdweb.com/references/typescript/v5/AdapterWalletOptions) : T extends DeepLinkSupportedWalletIds ? [DeepLinkSupportedWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/DeepLinkSupportedWalletCreationOptions) : T extends EcosystemWalletId ? [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions) | undefined : undefined; ` ### Example `type X = WalletCreationOptions<"io.metamask">; ` ## WalletConnectionOption Generic type for getting the type of object that the `wallet.connect` method takes as the first argument. `type WalletConnectionOption = T extends "walletConnect" ? [StandaloneWCConnectOptions](https://portal.thirdweb.com/references/typescript/v5/StandaloneWCConnectOptions) : T extends "smart" ? [SmartWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletConnectionOptions) : T extends "inApp" | "embedded" ? [InAppWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletConnectionOptions) : T extends typeof COINBASE ? | [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) | [CoinbaseSDKWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/CoinbaseSDKWalletConnectionOptions) : T extends [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds) & [WCSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/WCSupportedWalletIds) ? [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) | [WCConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions) : T extends [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds) ? [InjectedConnectOptions](https://portal.thirdweb.com/references/typescript/v5/InjectedConnectOptions) : T extends EcosystemWalletId ? [EcosystemWalletConnectionOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions) : [WCConnectOptions](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions); ` ### Example `type X = WalletConnectionOption<"io.metamask">; ` ## WalletEmitterEvents `type WalletEmitterEvents = { accountChanged: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); accountsChanged: Array; chainChanged: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); disconnect?: never; onConnect: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption); }; ` ##### accountChanged `type accountChanged = [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ##### accountsChanged `type accountsChanged = Array; ` ##### chainChanged `type chainChanged = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### disconnect `type disconnect = never; ` ##### onConnect `type onConnect = [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption); ` ## WalletInfo `type WalletInfo = { app: { android: string | null; browser: string | null; chrome: string | null; edge: string | null; firefox: string | null; ios: string | null; linux: string | null; mac: string | null; opera: string | null; safari: string | null; windows: string | null; }; deepLink?: { mobile: string }; desktop: { native: string | null; universal: string | null }; homepage: string; id: string; image_id: string; mobile: { native: string | null; universal: string | null }; name: string; rdns: string | null; }; ` ##### app `type app = { android: string | null; browser: string | null; chrome: string | null; edge: string | null; firefox: string | null; ios: string | null; linux: string | null; mac: string | null; opera: string | null; safari: string | null; windows: string | null; }; ` ##### deepLink `type deepLink = { mobile: string }; ` ##### desktop `type desktop = { native: string | null; universal: string | null }; ` ##### homepage `type homepage = string; ` ##### id `type id = string; ` ##### image\_id `type image_id = string; ` ##### mobile `type mobile = { native: string | null; universal: string | null }; ` ##### name `type name = string; ` ##### rdns `type rdns = string | null; ` ## WalletId `type WalletId = | "walletConnect" | "inApp" | "embedded" | "smart" | "adapter" | EcosystemWalletId | [WCSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/WCSupportedWalletIds) | [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds); ` ## WalletProvider A React context provider component that supplies Wallet-related data to its child components. This component serves as a wrapper around the `WalletProviderContext.Provider` and passes the provided wallet data down to all of its child components through the context API. ### Example #### Basic usage `import { WalletProvider, WalletIcon, WalletName, } from "thirdweb/react"; ; ` ##### Signature `function WalletProvider( props: PropsWithChildren<[WalletProviderProps](https://portal.thirdweb.com/references/typescript/v5/WalletProviderProps)>, ): Element; ` ### Parameters ##### props #### Type `let props: PropsWithChildren<[WalletProviderProps](https://portal.thirdweb.com/references/typescript/v5/WalletProviderProps)>; ` ### Returns ##### Return Type `let returnType: Element; ` ## WalletProviderProps Props for the WalletProvider component `type WalletProviderProps = { id: [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId) }; ` ##### id `type id = [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); ` ## WalletSendCallsParameters `type WalletSendCallsParameters< capabilities extends [WalletCapabilities](https://portal.thirdweb.com/references/typescript/v5/WalletCapabilities) = [WalletCapabilities](https://portal.thirdweb.com/references/typescript/v5/WalletCapabilities), chainId extends [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) | number = [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex), > = [ { calls: Array; capabilities?: capabilities; chainId: chainId; from: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); version: string; }, ]; ` ## WelcomeScreen Render custom Welcome Screen in "wide" `ConnectButton` 's Modal either by passing a custom React component or by passing an object with custom title, subtitle and image `type WelcomeScreen = | { img?: { height?: number; src: string; width?: number }; subtitle?: string; title?: string; } | (() => React.ReactNode); ` ### Example #### Custom React component ` , }} />; ` #### Custom title, subtitle and image `; ` ## WithdrawEventFilters Represents the filters for the "Withdraw" event. `type WithdrawEventFilters = Partial<{ caller: AbiParameterToPrimitiveType<{ indexed: true; name: "caller"; type: "address"; }>; owner: AbiParameterToPrimitiveType<{ indexed: true; name: "owner"; type: "address"; }>; receiver: AbiParameterToPrimitiveType<{ indexed: true; name: "receiver"; type: "address"; }>; }>; ` ## WatchBlockNumberOptions `type WatchBlockNumberOptions = { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); latestBlockNumber?: bigint; onError?: (error: Error) => void; onNewBlockNumber: (blockNumber: bigint) => void; overPollRatio?: number; }; ` ##### chain `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ##### client `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### latestBlockNumber `type latestBlockNumber = bigint; ` ##### onError ##### Signature `function onError(error: Error): void; ` ##### Parameters ##### error ###### Type `let error: Error; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onNewBlockNumber ##### Signature `function onNewBlockNumber(blockNumber: bigint): void; ` ##### Parameters ##### blockNumber ###### Type `let blockNumber: bigint; ` ##### Returns ##### Return Type `let returnType: void; ` ##### overPollRatio `type overPollRatio = number; ` ## WatchContractEventsOptions `type WatchContractEventsOptions< abi extends Abi, abiEvents extends Array<[PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>, TStrict extends boolean, > = Prettify< GetContractEventsOptionsDirect & { latestBlockNumber?: bigint; onEvents: ( events: [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult), ) => void; } >; ` ## WithdrawParams Represents the parameters for the "withdraw" function. `type WithdrawParams = WithOverrides<{ amount: AbiParameterToPrimitiveType<{ name: "amount"; type: "uint256"; }>; }>; ` ## WithdrawParams Represents the parameters for the "withdraw" function. `type WithdrawParams = WithOverrides<{ assets: AbiParameterToPrimitiveType<{ name: "assets"; type: "uint256"; }>; owner: AbiParameterToPrimitiveType<{ name: "owner"; type: "address"; }>; receiver: AbiParameterToPrimitiveType<{ name: "receiver"; type: "address"; }>; }>; ` ## airdropERC1155WithSignature Prepares a transaction to call the "airdropERC1155WithSignature" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC1155WithSignature } from "thirdweb/extensions/airdrop"; const transaction = airdropERC1155WithSignature({ contract, req: ..., signature: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC1155WithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC1155WithSignatureParams | { asyncParams: () => Promise; } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC1155WithSignature" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC1155WithSignatureParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## airdropERC1155 Prepares a transaction to call the "airdropERC1155" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC1155 } from "thirdweb/extensions/airdrop"; const transaction = airdropERC1155({ contract, tokenAddress: ..., contents: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC1155( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC1155Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC1155Params) | { asyncParams: () => Promise<[AirdropERC1155Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC1155Params)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC1155" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC1155Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC1155Params) | { asyncParams: () => Promise<[AirdropERC1155Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC1155Params)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## airdropERC20WithSignature Prepares a transaction to call the "airdropERC20WithSignature" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC20WithSignature } from "thirdweb/extensions/airdrop"; const transaction = airdropERC20WithSignature({ contract, req: ..., signature: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC20WithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC20WithSignatureParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC20WithSignature" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC20WithSignatureParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## airdropERC721 Prepares a transaction to call the "airdropERC721" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC721 } from "thirdweb/extensions/airdrop"; const transaction = airdropERC721({ contract, tokenAddress: ..., contents: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC721( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC721Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC721Params) | { asyncParams: () => Promise<[AirdropERC721Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC721Params)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC721" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC721Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC721Params) | { asyncParams: () => Promise<[AirdropERC721Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC721Params)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## claimERC1155 Claim airdrop of ERC1155 tokens for allowlisted addresses. (Pull based airdrop) ### Example `import { claimERC1155 } from "thirdweb/extensions/airdrop"; import { sendTransaction } from "thirdweb"; const tokenAddress = "0x..."; // Address of airdropped tokens to claim const recipient = "0x..."; // Address of the allowlisted recipient const claimTransaction = claimERC1155({ contract, tokenAddress, recipient, }); await sendTransaction({ claimTransaction, account }); ` ##### Signature `function claimERC1155( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC1155Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC1155Params)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC1155Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC1155Params)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## airdropERC721WithSignature Prepares a transaction to call the "airdropERC721WithSignature" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC721WithSignature } from "thirdweb/extensions/airdrop"; const transaction = airdropERC721WithSignature({ contract, req: ..., signature: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC721WithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC721WithSignatureParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC721WithSignature" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | AirdropERC721WithSignatureParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## airdropERC20 Prepares a transaction to call the "airdropERC20" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropERC20 } from "thirdweb/extensions/airdrop"; const transaction = airdropERC20({ contract, tokenAddress: ..., contents: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropERC20( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC20Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC20Params) | { asyncParams: () => Promise<[AirdropERC20Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC20Params)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropERC20" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropERC20Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC20Params) | { asyncParams: () => Promise<[AirdropERC20Params](https://portal.thirdweb.com/references/typescript/v5/AirdropERC20Params)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## airdropNativeToken Prepares a transaction to call the "airdropNativeToken" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { airdropNativeToken } from "thirdweb/extensions/airdrop"; const transaction = airdropNativeToken({ contract, contents: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function airdropNativeToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropNativeTokenParams](https://portal.thirdweb.com/references/typescript/v5/AirdropNativeTokenParams) | { asyncParams: () => Promise<[AirdropNativeTokenParams](https://portal.thirdweb.com/references/typescript/v5/AirdropNativeTokenParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "airdropNativeToken" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [AirdropNativeTokenParams](https://portal.thirdweb.com/references/typescript/v5/AirdropNativeTokenParams) | { asyncParams: () => Promise<[AirdropNativeTokenParams](https://portal.thirdweb.com/references/typescript/v5/AirdropNativeTokenParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## fetchProofsERC1155 Retrieves the claim merkle proof for the provided address. ### Example `import { fetchProofsERCC1155 } from "thirdweb/extensions/airdrop"; import { getContract, defineChain } from "thirdweb"; const TOKEN = getContracct({ client, chain: defineChain(1), address: "0x...", }); const merkleRoot = await tokenMerkleRoot({ contract: TOKEN, tokenAddress: TOKEN.address, }); const proof = await fetchProofsERC1155({ contract: TOKEN, recipient: "0x...", merkleRoot, }); ` ##### Signature `function fetchProofsERC1155(options: { contract: Readonly; merkleRoot: string; recipient: string; }): Promise; ` ### Parameters ##### options #### Type `let options: { contract: Readonly; merkleRoot: string; recipient: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the proof or null if the recipient is not in the allowlist ## fetchProofsERC20 Retrieves the claim merkle proof for the provided address. ### Example `import { fetchProofsERCC20 } from "thirdweb/extensions/airdrop"; import { getContract, defineChain } from "thirdweb"; const TOKEN = getContracct({ client, chain: defineChain(1), address: "0x...", }); const merkleRoot = await tokenMerkleRoot({ contract: TOKEN, tokenAddress: TOKEN.address, }); const proof = await fetchProofsERC20({ contract: TOKEN, recipient: "0x...", merkleRoot, }); ` ##### Signature `function fetchProofsERC20(options: { contract: Readonly; merkleRoot: string; recipient: string; tokenDecimals: number; }): Promise; ` ### Parameters ##### options #### Type `let options: { contract: Readonly; merkleRoot: string; recipient: string; tokenDecimals: number; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the proof or null if the recipient is not in the allowlist ## claimERC721 Claim airdrop of ERC721 tokens for allowlisted addresses. (Pull based airdrop) ### Example `import { claimERC721 } from "thirdweb/extensions/airdrop"; import { sendTransaction } from "thirdweb"; const tokenAddress = "0x..."; // Address of airdropped tokens to claim const recipient = "0x..."; // Address of the allowlisted recipient const claimTransaction = claimERC721({ contract, tokenAddress, recipient, }); await sendTransaction({ claimTransaction, account }); ` ##### Signature `function claimERC721( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC721Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC721Params)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC721Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC721Params)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## claimERC20 Claim airdrop of ERC20 tokens for allowlisted addresses. (Pull based airdrop) ### Example `import { claimERC20 } from "thirdweb/extensions/airdrop"; import { sendTransaction } from "thirdweb"; const tokenAddress = "0x..."; // Address of airdropped tokens to claim const recipient = "0x..."; // Address of the allowlisted recipient const claimTransaction = claimERC20({ contract, tokenAddress, recipient, }); await sendTransaction({ claimTransaction, account }); ` ##### Signature `function claimERC20( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC20Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC20Params)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimERC20Params](https://portal.thirdweb.com/references/typescript/v5/ClaimERC20Params)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## fetchProofsERC721 Retrieves the claim merkle proof for the provided address. ### Example `import { fetchProofsERC721 } from "thirdweb/extensions/airdrop"; import { getContract, defineChain } from "thirdweb"; const NFT = getContracct({ client, chain: defineChain(1), address: "0x...", }); const merkleRoot = await tokenMerkleRoot({ contract: NFT, tokenAddress: NFT.address, }); const proof = await fetchProofsERC721({ contract: NFT, recipient: "0x...", merkleRoot, }); ` ##### Signature `function fetchProofsERC721(options: { contract: Readonly; merkleRoot: string; recipient: string; }): Promise; ` ### Parameters ##### options #### Type `let options: { contract: Readonly; merkleRoot: string; recipient: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the proof or null if the recipient is not in the allowlist ## generateAirdropSignatureERC1155 Generates the req and signature for sending ERC1155 airdrop. ### Example `import { airdropERC1155WithSignature, generateAirdropSignatureERC1155, } from "thirdweb/extensions/airdrop"; // list of recipients, tokenIds and amounts to airdrop for each recipient const contents = [ { recipient: "0x...", tokenId: 0, amount: 10n }, { recipient: "0x...", tokenId: 0, amount: 15n }, { recipient: "0x...", tokenId: 0, amount: 20n }, ]; const { req, signature } = await generateAirdropSignatureERC1155({ account, contract, airdropRequest: { tokenAddress: "0x...", // address of the ERC1155 token to airdrop contents, }, }); const transaction = airdropERC1155WithSignature({ contract, req, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function generateAirdropSignatureERC1155(options: [GenerateAirdropERC1155SignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateAirdropERC1155SignatureOptions)) : Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` ### Parameters ##### options The options for the airdrop. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ### Returns ##### Return Type `` let returnType: Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` A promise that resolves to the req and signature. ## generateAirdropSignatureERC721 Generates the req and signature for sending ERC721 airdrop. ### Example `import { airdropERC721WithSignature, generateAirdropSignatureERC721, } from "thirdweb/extensions/airdrop"; // list of recipients and tokenIds to airdrop for each recipient const contents = [ { recipient: "0x...", tokenId: 0 }, { recipient: "0x...", tokenId: 1 }, { recipient: "0x...", tokenId: 2 }, ]; const { req, signature } = await generateAirdropSignatureERC721({ account, contract, airdropRequest: { tokenAddress: "0x...", // address of the ERC721 token to airdrop contents, }, }); const transaction = airdropERC721WithSignature({ contract, req, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function generateAirdropSignatureERC721(options: [GenerateAirdropERC721SignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateAirdropERC721SignatureOptions)) : Promise<{ req: { contents: readonly Array<{ recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` ### Parameters ##### options The options for the airdrop. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ### Returns ##### Return Type `` let returnType: Promise<{ req: { contents: readonly Array<{ recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` A promise that resolves to the req and signature. ## generateAirdropSignatureERC20 Generates the req and signature for sending ERC20 airdrop. ### Example `import { airdropERC20WithSignature, generateAirdropSignatureERC20, } from "thirdweb/extensions/airdrop"; // list of recipients and amounts to airdrop for each recipient const contents = [ { recipient: "0x...", amount: 10n }, // amount in wei { recipient: "0x...", amount: 15n }, // amount in wei { recipient: "0x...", amount: 20n }, // amount in wei ]; const { req, signature } = await generateAirdropSignatureERC20({ account, contract, airdropRequest: { tokenAddress: "0x...", // address of the ERC20 token to airdrop contents, }, }); const transaction = airdropERC20WithSignature({ contract, req, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function generateAirdropSignatureERC20(options: [GenerateAirdropERC20SignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateAirdropERC20SignatureOptions)) : Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` ### Parameters ##### options The options for the airdrop. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); airdropRequest: GenerateReqInput; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); }; ` ### Returns ##### Return Type `` let returnType: Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }> `` A promise that resolves to the req and signature. ## generateMerkleTreeInfoERC721 Generate merkle tree for a given snapshot. ### Example `import { generateMerkleTreeInfoERC721 } from "thirdweb/extensions/airdrop"; // snapshot / allowlist of airdrop recipients and amounts const snapshot = [ { recipient: "0x...", tokenId: 0 }, { recipient: "0x...", tokenId: 1 }, { recipient: "0x...", tokenId: 2 }, ]; const tokenAddress = "0x..."; // Address of ERC721 airdrop token const { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC721({ contract, tokenAddress, snapshot, }); // Optional next steps {See: saveSnapshot and setMerkleRoot functions} // - Save snapshot on-chain (on the airdrop contract uri) // - Set merkle root on the contract to enable claiming ` ##### Signature `function generateMerkleTreeInfoERC721( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC721Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC721Params)>, ): Promise<{ merkleRoot: string; snapshotUri: string }>; ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC721Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC721Params)>; ` ### Returns ##### Return Type `let returnType: Promise<{ merkleRoot: string; snapshotUri: string }>; ` A promise that resolves to the merkle-root and snapshot-uri. ## generateMerkleTreeInfoERC1155 Generate merkle tree for a given snapshot. ### Example `import { generateMerkleTreeInfoERC1155 } from "thirdweb/extensions/airdrop"; // snapshot / allowlist of airdrop recipients and amounts const snapshot = [ { recipient: "0x...", tokenId: 0, amount: 10 }, { recipient: "0x...", tokenId: 1, amount: 12 }, { recipient: "0x...", tokenId: 2, amount: 15 }, ]; const tokenAddress = "0x..."; // Address of ERC1155 airdrop token const { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC1155({ contract, tokenAddress, snapshot, }); // Optional next steps {See: saveSnapshot and setMerkleRoot functions} // - Save snapshot on-chain (on the airdrop contract uri) // - Set merkle root on the contract to enable claiming ` ##### Signature `function generateMerkleTreeInfoERC1155( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC1155Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC1155Params)>, ): Promise<{ merkleRoot: string; snapshotUri: string }>; ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC1155Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC1155Params)>; ` ### Returns ##### Return Type `let returnType: Promise<{ merkleRoot: string; snapshotUri: string }>; ` A promise that resolves to the merkle-root and snapshot-uri. ## generateMerkleTreeInfoERC20 Generate merkle tree for a given snapshot. ### Example `import { generateMerkleTreeInfoERC20 } from "thirdweb/extensions/airdrop"; // snapshot / allowlist of airdrop recipients and amounts const snapshot = [ { recipient: "0x...", amount: 10 }, { recipient: "0x...", amount: 15 }, { recipient: "0x...", amount: 20 }, ]; const tokenAddress = "0x..."; // Address of ERC20 airdrop token const { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC20( { contract, tokenAddress, snapshot, }, ); // Optional next steps {See: saveSnapshot and setMerkleRoot functions} // - Save snapshot on-chain (on the airdrop contract uri) // - Set merkle root on the contract to enable claiming ` ##### Signature `function generateMerkleTreeInfoERC20( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC20Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC20Params)>, ): Promise<{ merkleRoot: string; snapshotUri: string }>; ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GenerateMerkleTreeInfoERC20Params](https://portal.thirdweb.com/references/typescript/v5/GenerateMerkleTreeInfoERC20Params)>; ` ### Returns ##### Return Type `let returnType: Promise<{ merkleRoot: string; snapshotUri: string }>; ` A promise that resolves to the merkle-root and snapshot-uri. ## isClaimed Calls the "isClaimed" function on the contract. ### Example `import { isClaimed } from "thirdweb/extensions/airdrop"; const result = await isClaimed({ contract, receiver: ..., token: ..., tokenId: ..., }); ` ##### Signature `function isClaimed( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsClaimedParams](https://portal.thirdweb.com/references/typescript/v5/IsClaimedParams)>, ): Promise; ` ### Parameters ##### options The options for the isClaimed function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsClaimedParams](https://portal.thirdweb.com/references/typescript/v5/IsClaimedParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## saveSnapshot Generate merkle tree for a given snapshot and save the info on-chain. ### Example `` // This is ERC20 example. Should import and use other ERC variants as needed import { generateMerkleTreeInfoERC20, saveSnapshot, setMerkleRoot } from "thirdweb/extensions/airdrop"; // snapshot / allowlist of airdrop recipients and amounts const snapshot = [ { recipient: "0x...", amount: 10 }, { recipient: "0x...", amount: 15 }, { recipient: "0x...", amount: 20 }, ]; const tokenAddress = "0x..." // Address of airdrop token const { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC20({ contract, tokenAddress, snapshot }); const saveSnapshotTransaction = saveSnapshot({ contract, merkleRoot, snapshotUri, }); await sendTransaction({ saveSnapshotTransaction, account }); const setMerkleRootTransaction = setMerkleRoot({ contract, token, tokenMerkleRoot: merkleRoot as `0x${string}`, resetClaimStatus: false // toggle as needed signature, }); await sendTransaction({ setMerkleRootTransaction, account }); `` ##### Signature `function saveSnapshot( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SaveSnapshotParams](https://portal.thirdweb.com/references/typescript/v5/SaveSnapshotParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SaveSnapshotParams](https://portal.thirdweb.com/references/typescript/v5/SaveSnapshotParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## tokenConditionId Calls the "tokenConditionId" function on the contract. ### Example `import { tokenConditionId } from "thirdweb/extensions/airdrop"; const result = await tokenConditionId({ contract, tokenAddress: ..., }); ` ##### Signature `function tokenConditionId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenConditionIdParams](https://portal.thirdweb.com/references/typescript/v5/TokenConditionIdParams)>, ): Promise; ` ### Parameters ##### options The options for the tokenConditionId function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenConditionIdParams](https://portal.thirdweb.com/references/typescript/v5/TokenConditionIdParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setMerkleRoot Prepares a transaction to call the "setMerkleRoot" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setMerkleRoot } from "thirdweb/extensions/airdrop"; const transaction = setMerkleRoot({ contract, token: ..., tokenMerkleRoot: ..., resetClaimStatus: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setMerkleRoot( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/SetMerkleRootParams) | { asyncParams: () => Promise<[SetMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/SetMerkleRootParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setMerkleRoot" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/SetMerkleRootParams) | { asyncParams: () => Promise<[SetMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/SetMerkleRootParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## tokenMerkleRoot Calls the "tokenMerkleRoot" function on the contract. ### Example `import { tokenMerkleRoot } from "thirdweb/extensions/airdrop"; const result = await tokenMerkleRoot({ contract, tokenAddress: ..., }); ` ##### Signature `` function tokenMerkleRoot( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/TokenMerkleRootParams)>, ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the tokenMerkleRoot function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenMerkleRootParams](https://portal.thirdweb.com/references/typescript/v5/TokenMerkleRootParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## authenticate Authenticates the user based on the provided authentication arguments. ### Example `import { authenticate } from "thirdweb/wallets/in-app"; const result = await authenticate({ client, strategy: "email", email: "example@example.org", verificationCode: "123456", }); ` Authenticate to a backend account (only do this on your backend): `import { authenticate } from "thirdweb/wallets/in-app"; const result = await authenticate({ client, strategy: "backend", walletSecret: "...", // Provided by your app }); ` ##### Signature `function authenticate( args: AuthArgsType, ): Promise; ` ### Parameters ##### args The authentication arguments. #### Type `let args: AuthArgsType; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the authentication result. ## authenticateWithRedirect Authenticates the user based on the provided authentication arguments using a redirect. ### Example `import { authenticateWithRedirect } from "thirdweb/wallets/in-app"; const result = await authenticateWithRedirect({ client, strategy: "google", mode: "redirect", redirectUrl: "https://example.org", }); ` ##### Signature `function authenticateWithRedirect( args: SocialAuthArgsType & { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; }, ): Promise; ` ### Parameters ##### args The authentication arguments. #### Type `let args: SocialAuthArgsType & { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the authentication result. ## autoConnect Attempts to automatically connect to the last connected wallet. It combines both specified wallets and installed wallet providers that aren't already specified. ### Example `import { autoConnect } from "thirdweb/wallets"; const autoConnected = await autoConnect({ client, onConnect: (wallet) => { console.log("wallet", wallet); }, }); ` ##### Signature `function autoConnect( props: [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps) & { wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)> }, ): Promise; ` ### Parameters ##### props The auto-connect configuration properties #### Type `let props: [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps) & { wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)> }; ` ### Returns ##### Return Type `let returnType: Promise; ` a promise resolving to true or false depending on whether the auto connect function connected to a wallet or not ## batchMetadataUpdateEvent Creates an event object for the BatchMetadataUpdate event. ### Example `import { getContractEvents } from "thirdweb"; import { BatchMetadataERC1155 } from "thirdweb/modules"; const events = await getContractEvents({ contract, events: [BatchMetadataERC1155.batchMetadataUpdateEvent()], }); ` ##### Signature `function batchMetadataUpdateEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "startTokenIdIncluside"; readonly type: "uint256"; }, { readonly name: "endTokenIdInclusive"; readonly type: "uint256"; }, { readonly name: "baseURI"; readonly type: "string" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "startTokenIdIncluside"; readonly type: "uint256"; }, { readonly name: "endTokenIdInclusive"; readonly type: "uint256"; }, { readonly name: "baseURI"; readonly type: "string" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` The prepared event object. ## encodeInstall Encodes the install data for the BatchMetadataERC1155 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## install Installs the BatchMetadataERC1155 module on a core contract. ### Example `import { BatchMetadataERC1155 } from "thirdweb/modules"; const transaction = BatchMetadataERC1155.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## uploadMetadata Uploads metadata for a batch of NFTs. ### Example `import { BatchMetadataERC1155 } from "thirdweb/modules"; const transaction = BatchMetadataERC1155.uploadMetadata({ contract, metadatas: [{ name: "My NFT", description: "This is my NFT" }], }); await sendTransaction({ transaction, account, }); ` ##### Signature `function uploadMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UploadMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UploadMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UploadMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UploadMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction to upload the metadata. ## module Convenience function to add the BatchMetadataERC1155 module as a default module on a core contract. ### Example `import { BatchMetadataERC1155, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [BatchMetadataERC1155.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## batchMetadataUpdateEvent Creates an event object for the BatchMetadataUpdate event. ### Example `import { getContractEvents } from "thirdweb"; import { BatchMetadataERC721 } from "thirdweb/modules"; const events = await getContractEvents({ contract, events: [BatchMetadataERC721.batchMetadataUpdateEvent()], }); ` ##### Signature `function batchMetadataUpdateEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "startTokenIdIncluside"; readonly type: "uint256"; }, { readonly name: "endTokenIdInclusive"; readonly type: "uint256"; }, { readonly name: "baseURI"; readonly type: "string" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "startTokenIdIncluside"; readonly type: "uint256"; }, { readonly name: "endTokenIdInclusive"; readonly type: "uint256"; }, { readonly name: "baseURI"; readonly type: "string" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` The prepared event object. ## encodeInstall Encodes the install data for the BatchMetadataERC721 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## module Convenience function to add the BatchMetadataERC721 module as a default module on a core contract. ### Example `import { BatchMetadataERC721, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [BatchMetadataERC721.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## uploadMetadata Uploads metadata for a batch of NFTs. ### Example `import { BatchMetadataERC721 } from "thirdweb/modules"; const transaction = BatchMetadataERC721.uploadMetadata({ contract, metadatas: [{ name: "My NFT", description: "This is my NFT" }], }); await sendTransaction({ transaction, account, }); ` ##### Signature `function uploadMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UploadMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UploadMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UploadMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UploadMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction to upload the metadata. ## boolToBytes Converts a boolean value to a Uint8Array of bytes. ### Example `import { boolToBytes } from "thirdweb/utils"; const bytes = boolToBytes(true); console.log(bytes); // Uint8Array(1) [ 1 ] ` ##### Signature `function boolToBytes( value: boolean, opts: Options, ): Uint8Array; ` ### Parameters ##### value The boolean value to convert. #### Type `let value: boolean; ` ##### opts Optional parameters for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The Uint8Array of bytes representing the boolean value. ## boolToHex Converts a boolean value to a hexadecimal string representation. ### Example `import { boolToHex } from "thirdweb/utils"; const hex = boolToHex(true); console.log(hex); // "0x01" ` ##### Signature `` function boolToHex(value: boolean, opts: Options): `0x${string}`; `` ### Parameters ##### value The boolean value to convert. #### Type `let value: boolean; ` ##### opts Optional options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hexadecimal string representation of the boolean value. ## bundleUserOp Bundle a user operation. ### Example `import { bundleUserOp } from "thirdweb/wallets/smart"; const userOpHash = await bundleUserOp({ userOp, options, }); ` ##### Signature `` function bundleUserOp(args: { options: BundlerOptions; userOp: UserOperationV06 | UserOperationV07; }): Promise<`0x${string}`>; `` ### Parameters ##### args The options for bundling a user operation. #### Type `let args: { options: BundlerOptions; userOp: UserOperationV06 | UserOperationV07; }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The bundle hash of the user operation. ## bytesToBigInt Converts a Uint8Array of bytes to a bigint. ### Example `import { bytesToBigInt } from "thirdweb/utils"; const bytes = new Uint8Array([1, 164]); const bigInt = bytesToBigInt(bytes); console.log(bigInt); // 420n ` ##### Signature `function bytesToBigInt( bytes: Uint8Array, opts: [BytesToBigIntOpts](https://portal.thirdweb.com/references/typescript/v5/BytesToBigIntOpts), ): bigint; ` ### Parameters ##### bytes The Uint8Array of bytes to convert. #### Type `let bytes: Uint8Array; ` ##### opts Optional parameters for the conversion. #### Type `let opts: { signed?: boolean; size?: number }; ` ### Returns ##### Return Type `let returnType: bigint; ` The converted bigint. ## bytesToString Converts an array of bytes to a string using UTF-8 encoding. ### Example `import { bytesToString } from "thirdweb/utils"; const bytes = new Uint8Array([72, 101, 108, 108, 111]); const string = bytesToString(bytes); console.log(string); // "Hello" ` ##### Signature `function bytesToString(bytes_: Uint8Array, opts: Options): string; ` ### Parameters ##### bytes\_ The array of bytes to convert. #### Type `let bytes_: Uint8Array; ` ##### opts Optional parameters for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: string; ` The resulting string. ## bytesToBool Converts a byte array to a boolean value. ### Example `import { bytesToBool } from "thirdweb/utils"; const bytes = new Uint8Array([1]); const bool = bytesToBool(bytes); console.log(bool); // true ` ##### Signature `function bytesToBool(bytes_: Uint8Array, opts: Options): boolean; ` ### Parameters ##### bytes\_ The byte array to convert. #### Type `let bytes_: Uint8Array; ` ##### opts Optional parameters for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: boolean; ` The boolean value converted from the byte array. ## bytesToNumber Converts a Uint8Array of bytes to a number. ### Example `import { bytesToNumber } from "thirdweb/utils"; const bytes = new Uint8Array([1, 164]); const number = bytesToNumber(bytes); console.log(number); // 420 ` ##### Signature `function bytesToNumber( bytes: Uint8Array, opts: [BytesToBigIntOpts](https://portal.thirdweb.com/references/typescript/v5/BytesToBigIntOpts), ): number; ` ### Parameters ##### bytes The Uint8Array of bytes to convert. #### Type `let bytes: Uint8Array; ` ##### opts Optional configuration options. #### Type `let opts: { signed?: boolean; size?: number }; ` ### Returns ##### Return Type `let returnType: number; ` The converted number. ## chat Chat with Nebula. ### Example `import { Nebula } from "thirdweb/ai"; const response = await Nebula.chat({ client: TEST_CLIENT, message: "What's the symbol of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8", contextFilter: { chains: [sepolia], }, }); ` Multi message prompt: `const response = await Nebula.chat({ client, messages: [ { role: "user", content: "What's my balance?" }, { role: "assistant", content: "Your balance is 0.023 ETH" }, { role: "user", content: "What about my NFTs?" }, ], contextFilter: { chains: [sepolia], }, }); ` Extracting and sending transactions from a chat response: `const response = await Nebula.chat({ ... }); const transactions = response.transactions; for (const transaction of transactions) { await sendTransaction({ transaction, account }); } ` ##### Signature `function chat(input: [Input](https://portal.thirdweb.com/references/typescript/v5/Input)): Promise<[Output](https://portal.thirdweb.com/references/typescript/v5/Output)>; ` ### Parameters ##### input The input for the chat. #### Type `let input: { account?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contextFilter?: { chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; contractAddresses?: Array; walletAddresses?: Array; }; sessionId?: string; } & ( | { messages: Array<{ content: string; role: "user" | "assistant"; }>; } | { message: string } ); ` ### Returns ##### Return Type `let returnType: { message: string; sessionId: string; transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }; ` The chat response. This API is in early access and might change in the future. ## checksumAddress Calculates the checksum address for the given address. ### Example `import { checksumAddress } from "thirdweb/utils"; checksumAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"); //=> '0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed' ` ##### Signature `` function checksumAddress(address: string): `0x${string}`; `` ### Parameters ##### address The address to calculate the checksum for. #### Type `let address: string; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The checksum address. ## checkVerificationStatus Checks the verification status of a contract. ### Example `import { checkVerificationStatus } from "thirdweb/contract"; const verificationStatus = await checkVerificationStatus({ explorerApiUrl: "https://api.polygonscan.com/api", explorerApiKey: "YOUR_API_KEY", guid: "YOUR_GUID", }); console.log(verificationStatus); ` ##### Signature `function checkVerificationStatus( options: CheckVerificationStatusOptions, ): Promise; ` ### Parameters ##### options The options for checking the verification status. #### Type `let options: CheckVerificationStatusOptions; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves with the verification status data. ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { ClaimableERC1155 } from "thirdweb/modules"; const result = await ClaimableERC1155.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getClaimCondition Calls the "getClaimConditionByTokenId" function on the contract. ### Example `import { ClaimableERC1155 } from "thirdweb/modules"; const result = await ClaimableERC1155.getClaimConditionByTokenId({ contract, tokenId: ..., }); ` ##### Signature `` function getClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` ### Parameters ##### options The options for the getClaimConditionByTokenId function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `` let returnType: Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` The parsed result of the function call. ## encodeInstall Encodes the install data for the ClaimableERC1155 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## install Installs the ClaimableERC1155 module on a core contract. ### Example `import { ClaimableERC1155 } from "thirdweb/modules"; const transaction = ClaimableERC1155.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## module Convenience function to add the ClaimableERC1155 module as a default module on a core contract. ### Example `import { ClaimableERC1155, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [ ClaimableERC1155.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## mint Mints ERC1155 tokens to a specified address via a ClaimableERC1155 module. ### Example `import { ClaimableERC1155 } from "thirdweb/modules"; const transaction = ClaimableERC1155.mint({ contract, to: "0x...", // Address to mint tokens to quantity: 2, // Amount of tokens to mint }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## setClaimCondition Sets the claim conditions for a given token ID. ### Example `import { ClaimableERC1155 } from "thirdweb/modules"; const transaction = ClaimableERC1155.setClaimCondition({ contract: contract, tokenId: 0n, pricePerToken: "1", // in ETH maxClaimableSupply: "1000000", maxClaimablePerWallet: "1", }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< ClaimConditionInput & { tokenId: bigint } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for setting the claim conditions. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< ClaimConditionInput & { tokenId: bigint } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to set the claim conditions. ## encodeInstall Encodes the install data for the ClaimableERC20 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { ClaimableERC1155 } from "thirdweb/modules"; const transaction = ClaimableERC1155.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getClaimCondition Calls the "getClaimCondition" function on the contract. ### Example `import { ClaimableERC20 } from "thirdweb/modules"; const result = await ClaimableERC20.getClaimCondition({ contract, }); ` ##### Signature `` function getClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` ### Parameters ##### options The options for the getClaimCondition function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` The parsed result of the function call. ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { ClaimableERC20 } from "thirdweb/modules"; const result = await ClaimableERC20.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## install Installs the ClaimableERC20 module on a core contract. ### Example `import { ClaimableERC20 } from "thirdweb/modules"; const transaction = ClaimableERC20.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## mint Mints tokens to a specified address via a ClaimableERC20 module. ### Example `import { ClaimableERC20 } from "thirdweb/modules"; const transaction = ClaimableERC20.mint({ contract, to: "0x...", // Address to mint tokens to quantity: "0.1", // Amount of tokens to mint (in decimals) }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## module Convenience function to add the ClaimableERC20 module as a default module on a core contract. ### Example `import { ClaimableERC20, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC20", params: { name: "My Modular Contract", }, modules: [ ClaimableERC20.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## setClaimCondition Sets the claim conditions for a given token ID. ### Example `import { ClaimableERC20 } from "thirdweb/modules"; const transaction = ClaimableERC20.setClaimCondition({ contract: contract, pricePerToken: "1", // in ETH maxClaimableSupply: "1000000", maxClaimablePerWallet: "1", }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for setting the claim conditions. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to set the claim conditions. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { ClaimableERC20 } from "thirdweb/modules"; const transaction = ClaimableERC20.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeInstall Encodes the install data for the ClaimableERC721 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## getClaimCondition Calls the "getClaimCondition" function on the contract. ### Example `import { ClaimableERC721 } from "thirdweb/modules"; const result = await ClaimableERC721.getClaimCondition({ contract, }); ` ##### Signature `` function getClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` ### Parameters ##### options The options for the getClaimCondition function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<{ allowlistMerkleRoot: `0x${string}`; auxData: string; availableSupply: bigint; currency: string; endTimestamp: number; maxMintPerWallet: bigint; pricePerUnit: bigint; startTimestamp: number; }>; `` The parsed result of the function call. ## install Installs the BatchMetadataERC721 module on a core contract. ### Example `import { BatchMetadataERC721 } from "thirdweb/modules"; const transaction = BatchMetadataERC721.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## install Installs the ClaimableERC721 module on a core contract. ### Example `import { ClaimableERC721 } from "thirdweb/modules"; const transaction = ClaimableERC721.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { ClaimableERC721 } from "thirdweb/modules"; const result = await ClaimableERC721.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## mint Mints ERC721 tokens to a specified address via a ClaimableERC721 module. ### Example `import { ClaimableERC721 } from "thirdweb/modules"; const transaction = ClaimableERC721.mint({ contract, to: "0x...", // Address to mint tokens to quantity: 2, // Amount of tokens to mint }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## module Convenience function to add the ClaimableERC721 module as a default module on a core contract. ### Example `import { ClaimableERC721, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [ ClaimableERC721.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## setClaimCondition Sets the claim conditions for a given token ID. ### Example `import { ClaimableERC721 } from "thirdweb/modules"; const transaction = ClaimableERC721.setClaimCondition({ contract: contract, pricePerToken: "1", // in ETH maxClaimableSupply: "1000000", maxClaimablePerWallet: "1", }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for setting the claim conditions. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to set the claim conditions. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { ClaimableERC721 } from "thirdweb/modules"; const transaction = ClaimableERC721.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## checkModulesCompatibility Check if the given modules are compatible with the given core contract ##### Signature `function checkModulesCompatibility(options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); coreBytecode: string; moduleBytecodes: Array; }): Promise; ` ### Parameters ##### options #### Type `let options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); coreBytecode: string; moduleBytecodes: Array; }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## contractURI Calls the "contractURI" function on the contract. ### Example `import { contractURI } from "thirdweb/extensions/common"; const result = await contractURI({ contract, }); ` ##### Signature `function contractURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the contractURI function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## deployModularContract Deploys an thirdweb ERC20 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. ### Example `import { deployModularContract } from "thirdweb/modules"; const contractAddress = await deployModularContract({ chain, client, account, core: "ERC20", params: { name: "MyToken", description: "My Token contract", symbol: "MT", }, modules: [ ClaimableERC721.module({ primarySaleRecipient: "0x...", }), RoyaltyERC721.module({ royaltyRecipient: "0x...", royaltyBps: 500n, }), ], }); ` ##### Signature `function deployModularContract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); core: [CoreType](https://portal.thirdweb.com/references/typescript/v5/CoreType); modules?: Array<[ModuleInstaller](https://portal.thirdweb.com/references/typescript/v5/ModuleInstaller)>; params: [ModularContractParams](https://portal.thirdweb.com/references/typescript/v5/ModularContractParams); publisher?: string; salt?: string; }): Promise; ` ### Parameters ##### options The deployment options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); core: [CoreType](https://portal.thirdweb.com/references/typescript/v5/CoreType); modules?: Array<[ModuleInstaller](https://portal.thirdweb.com/references/typescript/v5/ModuleInstaller)>; params: [ModularContractParams](https://portal.thirdweb.com/references/typescript/v5/ModularContractParams); publisher?: string; salt?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` The deployed contract address. ## getContractMetadata Retrieves the contract metadata including name and symbol. ### Example `import { getContractMetadata } from "thirdweb/extensions/common"; const metadata = await getContractMetadata({ contract }); ` ##### Signature `function getContractMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<{ name: string; symbol: string }>; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise<{ name: string; symbol: string }>; ` A promise that resolves to an object containing the resolved metadata, name, and symbol. ## getDefaultRoyaltyInfo Calls the "getDefaultRoyaltyInfo" function on the contract. ### Example `import { getDefaultRoyaltyInfo } from "thirdweb/extensions/common"; const result = await getDefaultRoyaltyInfo({ contract, }); ` ##### Signature `function getDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getDefaultRoyaltyInfo function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getDeployedModule Gets a deployed module implementation contract. ### Example `import { getDeployedModule } from "thirdweb/modules"; const module = await getDeployedModule({ client, chain, contractId, publisher, }); ` ##### Signature `` function getDeployedModule(options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; publisher?: string; }): Promise>>; `` ### Parameters ##### options The options to use. #### Type `let options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; publisher?: string; }; ` ### Returns ##### Return Type `` let returnType: Promise >>; `` The module. ## getRoyaltyInfoForToken Calls the "getRoyaltyInfoForToken" function on the contract. ### Example `import { getRoyaltyInfoForToken } from "thirdweb/extensions/common"; const result = await getRoyaltyInfoForToken({ contract, tokenId: ..., }); ` ##### Signature `function getRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>, ): Promise; ` ### Parameters ##### options The options for the getRoyaltyInfoForToken function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getOrDeployModule Gets or deploys a module implementation contract. ### Example `import { getOrDeployModule } from "thirdweb/modules"; const module = await getOrDeployModule({ client, chain, account, contractId, publisher, }); ` ##### Signature `` function getOrDeployModule(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; publisher?: string; }): Promise>>; `` ### Parameters ##### options The options to use. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; publisher?: string; }; ` ### Returns ##### Return Type `` let returnType: Promise>>; `` The module. ## getPlatformFeeInfo Calls the "getPlatformFeeInfo" function on the contract. ### Example `import { getPlatformFeeInfo } from "thirdweb/extensions/common"; const result = await getPlatformFeeInfo({ contract, }); ` ##### Signature `function getPlatformFeeInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getPlatformFeeInfo function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## grantMinterRole Grants the minter role to a user. ### Example `import { grantMinterRole } from "thirdweb/modules"; const tx = await grantMinterRole({ contract, user: userAddress, }); ` ##### Signature `function grantMinterRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GrantMinterRoleParams](https://portal.thirdweb.com/references/typescript/v5/GrantMinterRoleParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GrantMinterRoleParams](https://portal.thirdweb.com/references/typescript/v5/GrantMinterRoleParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction to send. ## isGetContractMetadataSupported Checks if the `contractURI` method is supported by the given contract. ### Example `import { isContractURISupported } from "thirdweb/extensions/common"; const supported = isContractURISupported(["0x..."]); ` ##### Signature `function isGetContractMetadataSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `contractURI` method is supported. ## installPublishedModule Install a published module on a modular contract ### Example `import { installPublishedModule } from "thirdweb/modules"; const transaction = installPublishedModule({ client, chain, account, contract, moduleName: "MyModule", publisherAddress: "0x...", }); await sendTransaction({ transaction, account }); ` ##### Signature `function installPublishedModule( options: [InstallPublishedModuleOptions](https://portal.thirdweb.com/references/typescript/v5/InstallPublishedModuleOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for installing a published module #### Type `` let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); constructorParams?: Record; contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleName: string; nonce?: number; publisher?: string; version?: string; }; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction to send ## isGetDefaultRoyaltyInfoSupported Checks if the `getDefaultRoyaltyInfo` method is supported by the given contract. ### Example `import { isGetDefaultRoyaltyInfoSupported } from "thirdweb/extensions/common"; const supported = isGetDefaultRoyaltyInfoSupported(["0x..."]); ` ##### Signature `function isGetDefaultRoyaltyInfoSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getDefaultRoyaltyInfo` method is supported. ## isGetRoyaltyInfoForTokenSupported Checks if the `getRoyaltyInfoForToken` method is supported by the given contract. ### Example `import { isGetRoyaltyInfoForTokenSupported } from "thirdweb/extensions/common"; const supported = isGetRoyaltyInfoForTokenSupported(["0x..."]); ` ##### Signature `function isGetRoyaltyInfoForTokenSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getRoyaltyInfoForToken` method is supported. ## isGetPlatformFeeInfoSupported Checks if the `getPlatformFeeInfo` method is supported by the given contract. ### Example `import { isGetPlatformFeeInfoSupported } from "thirdweb/extensions/common"; const supported = isGetPlatformFeeInfoSupported(["0x..."]); ` ##### Signature `function isGetPlatformFeeInfoSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getPlatformFeeInfo` method is supported. ## isMulticallSupported Checks if the `multicall` method is supported by the given contract. ### Example `import { isMulticallSupported } from "thirdweb/extensions/common"; const supported = isMulticallSupported(["0x..."]); ` ##### Signature `function isMulticallSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `multicall` method is supported. ## isOwnerSupported Checks if the `owner` method is supported by the given contract. ### Example `import { isOwnerSupported } from "thirdweb/extensions/common"; const supported = isOwnerSupported(["0x..."]); ` ##### Signature `function isOwnerSupported(availableSelectors: Array): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `owner` method is supported. ## isPrimarySaleRecipientSupported Checks if the `primarySaleRecipient` method is supported by the given contract. ### Example `import { isPrimarySaleRecipientSupported } from "thirdweb/extensions/common"; const supported = isPrimarySaleRecipientSupported(["0x..."]); ` ##### Signature `function isPrimarySaleRecipientSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `primarySaleRecipient` method is supported. ## SiteEmbed Embeds another thirdweb-supported site for seamless in-app and ecosystem wallet connection. Make sure the embedded site includes `` and supports frame ancestors, see [ here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors) for more information. The embedded site must support the connected wallet (ecosystem or in-app). ### Example `import { SiteEmbed } from "thirdweb/react"; ; ` ##### Signature `function SiteEmbed( props: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; src: string; } & ClassAttributes & IframeHTMLAttributes, ): Element; ` ### Parameters ##### props The props to pass to the iframe #### Type `let props: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; src: string; } & ClassAttributes & IframeHTMLAttributes; ` ### Returns ##### Return Type `let returnType: Element; ` ## isNameSupported Checks if the `name` method is supported by the given contract. ### Example `import { isNameSupported } from "thirdweb/extensions/common"; const supported = isNameSupported(["0x..."]); ` ##### Signature `function isNameSupported(availableSelectors: Array): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `name` method is supported. ## isSetPlatformFeeInfoSupported Checks if the `setPlatformFeeInfo` method is supported by the given contract. ### Example `import { isSetPlatformFeeInfoSupported } from "thirdweb/extensions/common"; const supported = isSetPlatformFeeInfoSupported(["0x..."]); ` ##### Signature `function isSetPlatformFeeInfoSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setPlatformFeeInfo` method is supported. ## isSetContractURISupported Checks if the `setContractURI` method is supported by the given contract. ### Example `import { isSetContractURISupported } from "thirdweb/extensions/common"; const supported = isSetContractURISupported(["0x..."]); ` ##### Signature `function isSetContractURISupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setContractURI` method is supported. ## isSetPrimarySaleRecipientSupported Checks if the `setPrimarySaleRecipient` method is supported by the given contract. ### Example `import { isSetPrimarySaleRecipientSupported } from "thirdweb/extensions/common"; const supported = isSetPrimarySaleRecipientSupported(["0x..."]); ` ##### Signature `function isSetPrimarySaleRecipientSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setPrimarySaleRecipient` method is supported. ## isSetDefaultRoyaltyInfoSupported Checks if the `setDefaultRoyaltyInfo` method is supported by the given contract. ### Example `import { isSetDefaultRoyaltyInfoSupported } from "thirdweb/extensions/common"; const supported = isSetDefaultRoyaltyInfoSupported(["0x..."]); ` ##### Signature `function isSetDefaultRoyaltyInfoSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setDefaultRoyaltyInfo` method is supported. ## isSymbolSupported Checks if the `symbol` method is supported by the given contract. ### Example `import { isSymbolSupported } from "thirdweb/extensions/common"; const supported = isSymbolSupported(["0x..."]); ` ##### Signature `function isSymbolSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `symbol` method is supported. ## isSetRoyaltyInfoForTokenSupported Checks if the `setRoyaltyInfoForToken` method is supported by the given contract. ### Example `import { isSetRoyaltyInfoForTokenSupported } from "thirdweb/extensions/common"; const supported = isSetRoyaltyInfoForTokenSupported(["0x..."]); ` ##### Signature `function isSetRoyaltyInfoForTokenSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setRoyaltyInfoForToken` method is supported. ## multicall Prepares a transaction to call the "multicall" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { multicall } from "thirdweb/extensions/common"; const transaction = multicall({ contract, data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function multicall( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [MulticallParams](https://portal.thirdweb.com/references/typescript/v5/MulticallParams) | { asyncParams: () => Promise<[MulticallParams](https://portal.thirdweb.com/references/typescript/v5/MulticallParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "multicall" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [MulticallParams](https://portal.thirdweb.com/references/typescript/v5/MulticallParams) | { asyncParams: () => Promise<[MulticallParams](https://portal.thirdweb.com/references/typescript/v5/MulticallParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## name Retrieves the name associated with the given contract. ### Example `import { name } from "thirdweb/extensions/common"; const contractName = await name({ contract }); ` ##### Signature `function name(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the transaction. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the name associated with the contract. ## owner Calls the "owner" function on the contract. ### Example `import { owner } from "thirdweb/extensions/common"; const result = await owner({ contract, }); ` ##### Signature `function owner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the owner function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## ownerUpdatedEvent Creates an event object for the OwnerUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { ownerUpdatedEvent } from "thirdweb/extensions/common"; const events = await getContractEvents({ contract, events: [ ownerUpdatedEvent({ prevOwner: ..., newOwner: ..., }) ], }); ` ##### Signature `function ownerUpdatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "prevOwner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "newOwner"; readonly type: "address"; }, ]; readonly name: "OwnerUpdated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "prevOwner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "newOwner"; readonly type: "address"; }, ]; readonly name: "OwnerUpdated"; readonly type: "event"; }>; ` The prepared event object. ## primarySaleRecipient Calls the "primarySaleRecipient" function on the contract. ### Example `import { primarySaleRecipient } from "thirdweb/extensions/common"; const result = await primarySaleRecipient({ contract, }); ` ##### Signature `function primarySaleRecipient( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the primarySaleRecipient function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setContractMetadata Sets the metadata for a contract. ### Example `import { setContractMetadata } from "@thirdweb/extensions/common"; import { sendTransaction } from "thirdweb"; const transaction = setContractMetadata({ contract, name: "My NFT", symbol: "NFT", }); // Send the transaction await sendTransaction({ transaction, account, }); ` ##### Signature `function setContractMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetContractMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetContractMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for setting the contract metadata. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetContractMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetContractMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` * The prepared transaction to set the contract metadata. ## setContractURI Prepares a transaction to call the "setContractURI" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setContractURI } from "thirdweb/extensions/common"; const transaction = setContractURI({ contract, uri: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setContractURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetContractURIParams](https://portal.thirdweb.com/references/typescript/v5/SetContractURIParams) | { asyncParams: () => Promise<[SetContractURIParams](https://portal.thirdweb.com/references/typescript/v5/SetContractURIParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setContractURI" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetContractURIParams](https://portal.thirdweb.com/references/typescript/v5/SetContractURIParams) | { asyncParams: () => Promise<[SetContractURIParams](https://portal.thirdweb.com/references/typescript/v5/SetContractURIParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setOwner Prepares a transaction to call the "setOwner" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setOwner } from "thirdweb/extensions/common"; const transaction = setOwner({ contract, newOwner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setOwner( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams) | { asyncParams: () => Promise<[SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setOwner" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams) | { asyncParams: () => Promise<[SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setDefaultRoyaltyInfo Prepares a transaction to call the "setDefaultRoyaltyInfo" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setDefaultRoyaltyInfo } from "thirdweb/extensions/common"; const transaction = setDefaultRoyaltyInfo({ contract, royaltyRecipient: ..., royaltyBps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setDefaultRoyaltyInfo" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setPrimarySaleRecipient Prepares a transaction to call the "setPrimarySaleRecipient" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setPrimarySaleRecipient } from "thirdweb/extensions/common"; const transaction = setPrimarySaleRecipient({ contract, saleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setPrimarySaleRecipient( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPrimarySaleRecipientParams](https://portal.thirdweb.com/references/typescript/v5/SetPrimarySaleRecipientParams) | { asyncParams: () => Promise<[SetPrimarySaleRecipientParams](https://portal.thirdweb.com/references/typescript/v5/SetPrimarySaleRecipientParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setPrimarySaleRecipient" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPrimarySaleRecipientParams](https://portal.thirdweb.com/references/typescript/v5/SetPrimarySaleRecipientParams) | { asyncParams: () => Promise<[SetPrimarySaleRecipientParams](https://portal.thirdweb.com/references/typescript/v5/SetPrimarySaleRecipientParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setRoyaltyInfoForToken Prepares a transaction to call the "setRoyaltyInfoForToken" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setRoyaltyInfoForToken } from "thirdweb/extensions/common"; const transaction = setRoyaltyInfoForToken({ contract, tokenId: ..., recipient: ..., bps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setRoyaltyInfoForToken" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setPlatformFeeInfo Prepares a transaction to call the "setPlatformFeeInfo" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setPlatformFeeInfo } from "thirdweb/extensions/common"; const transaction = setPlatformFeeInfo({ contract, platformFeeRecipient: ..., platformFeeBps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setPlatformFeeInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPlatformFeeInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetPlatformFeeInfoParams) | { asyncParams: () => Promise<[SetPlatformFeeInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetPlatformFeeInfoParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setPlatformFeeInfo" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPlatformFeeInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetPlatformFeeInfoParams) | { asyncParams: () => Promise<[SetPlatformFeeInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetPlatformFeeInfoParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## symbol Retrieves the name associated with the given contract. ### Example `import { symbol } from "thirdweb/extensions/common"; const contractSymbol = await symbol({ contract }); ` ##### Signature `function symbol(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the transaction. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the name associated with the contract. ## uninstallPublishedModule Uninstall a published module ### Example `import { uninstallPublishedModule } from "thirdweb/modules"; const transaction = uninstallPublishedModule({ client, chain, contract, moduleName: "MyModule", publisherAddress: "0x...", }); await sendTransaction({ transaction, account }); ` ##### Signature `function uninstallPublishedModule( options: [UninstallPublishedModuleOptions](https://portal.thirdweb.com/references/typescript/v5/UninstallPublishedModuleOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for uninstalling a published module #### Type `` let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleName: string; publisherAddress?: string; version?: string; }; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction to send ## uninstallModuleByProxy Uninstall an module by proxy ### Example `import { uninstallModuleByProxy } from "thirdweb/modules"; const transaction = uninstallModuleByProxy({ client, chain, contract, moduleProxyAddress: "0x...", }); await sendTransaction({ transaction, account }); ` ##### Signature `function uninstallModuleByProxy( options: [UninstallModuleByProxyOptions](https://portal.thirdweb.com/references/typescript/v5/UninstallModuleByProxyOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for uninstalling an module by proxy #### Type `` let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); moduleData?: `0x${string}`; moduleProxyAddress: string; }; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction to send ## UI Components ##### Wallets ##### Wallet Connection ##### Chain ##### Transactions ##### NFT ##### Tokens ##### Miscellaneous ## computeDeploymentAddress Computes the deployment address for a contract based on the given options. ### Example `import { computeDeploymentAddress } from "thirdweb/utils"; const deploymentAddress = computeDeploymentAddress({ bytecode, encodedArgs, create2FactoryAddress, salt, }); ` ##### Signature `function computeDeploymentAddress( options: ComputeDeploymentAddressOptions, ): string; ` ### Parameters ##### options The options for computing the deployment address. #### Type `let options: ComputeDeploymentAddressOptions; ` ### Returns ##### Return Type `let returnType: string; ` The computed deployment address. ## concatHex Concatenates an array of hexadecimal values into a single hexadecimal value. ##### Signature `` function concatHex(values: readonly Array<`0x${string}`>) : `0x${string}` `` ### Parameters ##### values An array of hexadecimal values to concatenate. #### Type `` let values: readonly Array<`0x${string}`> `` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The concatenated hexadecimal value. ## convertCryptoToFiat Get a price of a token (using tokenAddress + chainId) in fiat. Only USD is supported at the moment. ### Example #### Basic usage For native token (non-ERC20), you should use NATIVE\_TOKEN\_ADDRESS as the value for `tokenAddress` `` import { convertCryptoToFiat } from "thirdweb/pay"; // Get Ethereum price const result = convertCryptoToFiat({ fromTokenAddress: NATIVE_TOKEN_ADDRESS, to: "USD", chain: ethereum, fromAmount: 1, }); // Result: `{ result: 3404.11 }` `` ##### Signature `function convertCryptoToFiat( options: [ConvertCryptoToFiatParams](https://portal.thirdweb.com/references/typescript/v5/ConvertCryptoToFiatParams), ): Promise<{ result: number }>; ` ### Parameters ##### options #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAmount: number; fromTokenAddress: Address; to: SupportedFiatCurrency; }; ` ### Returns ##### Return Type `let returnType: Promise<{ result: number }>; ` a number representing the price (in selected fiat) of "x" token, with "x" being the `fromAmount` . ## convertFiatToCrypto Convert a fiat value to a token. Currently only USD is supported. ### Example #### Basic usage `import { convertFiatToCrypto } from "thirdweb/pay"; // Convert 2 cents to ETH const result = await convertFiatToCrypto({ from: "USD", // the token address. For native token, use NATIVE_TOKEN_ADDRESS to: "0x...", // the chain (of the chain where the token belong to) chain: ethereum, // 2 cents fromAmount: 0.02, }); ` Result: `{ result: 0.0000057 }` ##### Signature `function convertFiatToCrypto( options: [ConvertFiatToCryptoParams](https://portal.thirdweb.com/references/typescript/v5/ConvertFiatToCryptoParams), ): Promise<{ result: number }>; ` ### Parameters ##### options #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); from: SupportedFiatCurrency; fromAmount: number; to: Address; }; ` ### Returns ##### Return Type `let returnType: Promise<{ result: number }>; ` ## createAndSignUserOp Create and sign a user operation. ### Example `import { createAndSignUserOp } from "thirdweb/wallets/smart"; const userOp = await createAndSignUserOp({ client, adminAccount, smartWalletOptions, transactions, }); ` ##### Signature `function createAndSignUserOp(options: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); isDeployedOverride?: boolean; smartWalletOptions: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; waitForDeployment?: boolean; }): Promise; ` ### Parameters ##### options The options for creating and signing the user operation #### Type `let options: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); isDeployedOverride?: boolean; smartWalletOptions: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; waitForDeployment?: boolean; }; ` ### Returns ##### Return Type `let returnType: Promise; ` * The signed user operation ## createAuth Creates an authentication object with the given options. ### Example `import { createAuth } from 'thirdweb/auth'; const auth = createAuth({...}); // 1. generate a login payload for a client on the server side const loginPayload = await auth.generatePayload({ address: '0x123...' }); // 2. send the login payload to the client // 3. verify the login payload that the client sends back later const verifiedPayload = await auth.verifyPayload({ payload: loginPayload, signature: '0x123...' }); // 4. generate a JWT for the client const jwt = await auth.generateJWT({ payload: verifiedPayload }); // 5. set the JWT as a cookie or otherwise provide it to the client // 6. authenticate the client based on the JWT on subsequent calls const { valid, parsedJWT } = await auth.verifyJWT({ jwt }); ` ##### Signature `function createAuth(options: [AuthOptions](https://portal.thirdweb.com/references/typescript/v5/AuthOptions)): { generateJWT: (params: GenerateJWTParams) => Promise; generatePayload: ( __namedParameters: [GenerateLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/GenerateLoginPayloadParams), ) => Promise<[LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload)>; verifyJWT: (params: VerifyJWTParams) => Promise; verifyPayload: ( __namedParameters: [VerifyLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadParams), ) => Promise<[VerifyLoginPayloadResult](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadResult)>; }; ` ### Parameters ##### options The options for creating the authentication object. #### Type `let options: { adminAccount?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client?: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); domain: string; jwt?: { expirationTimeSeconds?: number; jwtId?: { generate: () => string | Promise; validate: (jwtId: string) => boolean | Promise; }; }; login?: { nonce?: { generate: () => string | Promise; validate: (nonce: string) => boolean | Promise; }; payloadExpirationTimeSeconds?: number; resources?: Array; statement?: string; uri?: string; version?: string; }; }; ` ### Returns ##### Return Type `let returnType: { generateJWT: (params: GenerateJWTParams) => Promise; generatePayload: ( __namedParameters: [GenerateLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/GenerateLoginPayloadParams), ) => Promise<[LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload)>; verifyJWT: (params: VerifyJWTParams) => Promise; verifyPayload: ( __namedParameters: [VerifyLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadParams), ) => Promise<[VerifyLoginPayloadResult](https://portal.thirdweb.com/references/typescript/v5/VerifyLoginPayloadResult)>; }; ` The created authentication object. ## createThirdwebClient Creates a Thirdweb client using the provided client ID (client-side) or secret key (server-side). Get your client ID and secret key from the Thirdweb dashboard [ here](https://thirdweb.com/create-api-key) . \*\*Never share your secret key with anyone. A client is necessary for most functions in the thirdweb SDK. It provides access to thirdweb APIs including built-in RPC, storage, and more. ### Example Create a client on the client side (client ID): `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "..." }); ` Create a client on the server (secret key): `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ secretKey: "..." }); ` ##### Signature `function createThirdwebClient( options: [CreateThirdwebClientOptions](https://portal.thirdweb.com/references/typescript/v5/CreateThirdwebClientOptions), ): [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ### Parameters ##### options The options for creating the client. #### Type `let options: Prettify< ( | { clientId: string; secretKey?: string } | { clientId?: string; secretKey: string } ) & ClientOptions >; ` ### Returns ##### Return Type `let returnType: { readonly clientId: string; readonly secretKey: string | undefined; } & Readonly; ` The created Thirdweb client. ## createUnsignedUserOp Creates an unsigned user operation from a prepared transaction. ### Example `import { createUnsignedUserOp } from "thirdweb/wallets/smart"; const transaction = prepareContractCall(...); const userOp = await createUnsignedUserOp({ transaction, factoryContract, accountContract, adminAddress, sponsorGas, overrides, }); ` ##### Signature `` function createUnsignedUserOp(args: { accountContract: Readonly; adminAddress: string; factoryContract: Readonly; isDeployedOverride?: boolean; overrides?: { accountAddress?: string; accountSalt?: string; bundlerUrl?: string; createAccount?: ( factoryContract: Readonly, admin: string, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); entrypointAddress?: string; execute?: ( accountContract: Readonly, transaction: SendTransactionOption, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); executeBatch?: ( accountContract: Readonly, transactions: Array, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); getAccountNonce?: (accountContract: Readonly) => Promise; paymaster?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; predictAddress?: ( factoryContract: Readonly, admin: string, ) => Promise; signMessage?: (options: { accountContract: Readonly; adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: Readonly; message: SignableMessage; }) => Promise<`0x${string}`>; signTypedData?: (options: { accountContract: Readonly; adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: Readonly; typedData: Definition; }) => Promise<`0x${string}`>; tokenPaymaster?: TokenPaymasterConfig; }; sponsorGas: boolean; transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); waitForDeployment?: boolean; }): Promise; `` ### Parameters ##### args The prepared transaction and options #### Type `` let args: { accountContract: Readonly; adminAddress: string; factoryContract: Readonly; isDeployedOverride?: boolean; overrides?: { accountAddress?: string; accountSalt?: string; bundlerUrl?: string; createAccount?: ( factoryContract: Readonly, admin: string, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); entrypointAddress?: string; execute?: ( accountContract: Readonly, transaction: SendTransactionOption, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); executeBatch?: ( accountContract: Readonly, transactions: Array, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); getAccountNonce?: (accountContract: Readonly) => Promise; paymaster?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; predictAddress?: ( factoryContract: Readonly, admin: string, ) => Promise; signMessage?: (options: { accountContract: Readonly; adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: Readonly; message: SignableMessage; }) => Promise<`0x${string}`>; signTypedData?: (options: { accountContract: Readonly; adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: Readonly; typedData: Definition; }) => Promise<`0x${string}`>; tokenPaymaster?: TokenPaymasterConfig; }; sponsorGas: boolean; transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); waitForDeployment?: boolean; }; `` ### Returns ##### Return Type `let returnType: Promise; ` * The unsigned user operation ## createContractQuery Creates a `useQuery` hook for a contract call. ### Example `import { createContractQuery } from "thirdweb/react"; import { totalSupply } from "thirdweb/extensions/erc20"; const useTotalSupply = createContractQuery(totalSupply); const { data, isLoading } = useTotalSupply({ contract }); ` ##### Signature `` function createContractQuery( readCall: ( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ) => Promise, ): ( options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; } & opts & { queryOptions?: Partial<{ enabled: boolean }> }, ) => UseQueryResult; `` ### Parameters ##### readCall A function that performs the contract function call and returns the result. #### Type `let readCall: ( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ) => Promise; ` ### Returns ##### Return Type `` let returnType: ( options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; } & opts & { queryOptions?: Partial<{ enabled: boolean }> }, ) => UseQueryResult; `` An object containing the created `useRead` hook. ## createWalletAdapter Creates a wallet from the given account. You can use this to: * convert a third party library wallet (wagmi, viem, ethers) into a thirdweb wallet. * connect with a private key (for automated tests) Available wallet adatpers: * [ Viem](https://portal.thirdweb.com/references/typescript/v5/viemAdapter) * [ Ethers 6](https://portal.thirdweb.com/references/typescript/v5/ethers6Adapter) * [ Ethers 5](https://portal.thirdweb.com/references/typescript/v5/ethers5Adapter) ### Example `import { createWalletAdapter } from "thirdweb"; const wallet = createWalletAdapter({ client, adaptedAccount, chain, onDisconnect: () => { // disconnect logic }, switchChain: async (chain) => { // switch chain logic }, }); ` ##### Signature `function createWalletAdapter( options: [AdapterWalletOptions](https://portal.thirdweb.com/references/typescript/v5/AdapterWalletOptions), ): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"adapter">; ` ### Parameters ##### options The options for the adapter wallet. #### Type `let options: { adaptedAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onDisconnect: () => Promise | void; switchChain: (chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)) => Promise | void; }; ` ### Returns ##### Return Type `let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"adapter">; ` a wallet instance. ## createWalletConnectClient Creates a new WalletConnect client for interacting with another application. ### Example `import { createWalletConnectClient } from "thirdweb/wallets"; const client = await createWalletConnectClient({ wallet: wallet, client: client, }); ` Pass custom handlers: `import { createWalletConnectClient } from "thirdweb/wallets"; const client = await createWalletConnectClient({ wallet: wallet, client: client, requestHandlers: { eth_signTransaction: ({ account, chainId, params }) => { // handle transaction signing }, }, }); ` Pass connect and disconnect callbacks: `import { createWalletConnectClient } from "thirdweb/wallets"; const client = await createWalletConnectClient({ wallet: wallet, client: client, onConnect: (session) => { console.log("Connected to WalletConnect", session); }, onDisconnect: (session) => { console.log("Disconnected from WalletConnect", session); }, }); ` ##### Signature `` function createWalletConnectClient(options: { appMetadata?: AppMetadata; chains?: Array>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession)) => void; onDisconnect?: (session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession)) => void; onError?: (error: Error) => void; projectId?: string; requestHandlers?: { eth_sendRawTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chainId: number; params: WalletConnectRawTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_sendTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chainId: number; params: WalletConnectTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_sign?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignRequestPrams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTypedData?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignTypedDataRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTypedData_v4?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignTypedDataRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; personal_sign?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignRequestPrams; }) => Promise<`0x${string}` | WalletConnectRequestError>; wallet_addEthereumChain?: (_: { params: WalletConnectAddEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }) => Promise<`0x${string}`>; wallet_switchEthereumChain?: (_: { params: WalletConnectSwitchEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }) => Promise<`0x${string}`>; }; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }): Promise; `` ### Parameters ##### options The options to use to create the WalletConnect client. #### Type `` let options: { appMetadata?: AppMetadata; chains?: Array>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession)) => void; onDisconnect?: (session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession)) => void; onError?: (error: Error) => void; projectId?: string; requestHandlers?: { eth_sendRawTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chainId: number; params: WalletConnectRawTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_sendTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chainId: number; params: WalletConnectTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_sign?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignRequestPrams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTransaction?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectTransactionRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTypedData?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignTypedDataRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; eth_signTypedData_v4?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignTypedDataRequestParams; }) => Promise<`0x${string}` | WalletConnectRequestError>; personal_sign?: (_: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); params: WalletConnectSignRequestPrams; }) => Promise<`0x${string}` | WalletConnectRequestError>; wallet_addEthereumChain?: (_: { params: WalletConnectAddEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }) => Promise<`0x${string}`>; wallet_switchEthereumChain?: (_: { params: WalletConnectSwitchEthereumChainRequestParams; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }) => Promise<`0x${string}`>; }; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; `` ### Returns ##### Return Type `let returnType: Promise; ` The WalletConnect client. Use this client to connect to a WalletConnect URI with createWalletConnectSession. ## createWallet Creates a wallet based on the provided ID and arguments. * Supports 500+ wallets * Handles both injected browser wallets and WalletConnect sessions [ View all available wallets](https://portal.thirdweb.com/typescript/v5/supported-wallets) ### Example ### Connecting the wallet Once created, you can connect the wallet to your app by calling the `connect` method. The `connect` method returns a promise that resolves to the connected account. Each wallet type can have different connect options. [ View the different connect options](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption) ### Connecting to an injected wallet `import { createWallet } from "thirdweb/wallets"; const metamaskWallet = createWallet("io.metamask"); const account = await metamaskWallet.connect({ client, }); ` You can check if a wallet is installed by calling the [ injectedProvider](https://portal.thirdweb.com/references/typescript/v5/injectedProvider) method. ### Connecting via WalletConnect modal `import { createWallet } from "thirdweb/wallets"; const metamaskWallet = createWallet("io.metamask"); await metamask.connect({ client, walletConnect: { projectId: "YOUR_PROJECT_ID", showQrModal: true, appMetadata: { name: "My App", url: "https://my-app.com", description: "my app description", logoUrl: "https://path/to/my-app/logo.svg", }, }, }); ` [ View ConnectWallet connection options](https://portal.thirdweb.com/references/typescript/v5/WCConnectOptions) ### Connecting with coinbase wallet `import { createWallet } from "thirdweb/wallets"; const cbWallet = createWallet("com.coinbase.wallet", { appMetadata: { name: "My App", url: "https://my-app.com", description: "my app description", logoUrl: "https://path/to/my-app/logo.svg", }, walletConfig: { // options: 'all' | 'smartWalletOnly' | 'eoaOnly' options: "all", }, }); const account = await cbWallet.connect({ client, }); ` [ View Coinbase wallet creation options](https://portal.thirdweb.com/references/typescript/v5/CoinbaseWalletCreationOptions) ### Connecting with a smart wallet `import { createWallet } from "thirdweb/wallets"; const wallet = createWallet("smart", { chain: sepolia, sponsorGas: true, }); const account = await wallet.connect({ client, personalAccount, // pass the admin account }); ` ##### Signature `function createWallet(...args: [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ### Parameters ##### args The arguments for creating the wallet. #### Type `let args: [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs); ` ### Returns ##### Return Type `let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` * The created wallet. ## createWalletConnectSession Initiates a new WalletConnect session for interacting with another application. ### Example `import { createWalletConnectClient, createWalletConnectSession, } from "thirdweb/wallets"; const client = await createWalletConnectClient({ wallet: wallet, client: client, }); const session = createWalletConnectSession({ walletConnectClient: client, uri: "wc:...", }); ` ##### Signature `function createWalletConnectSession( options: CreateWalletConnectSessionOptions, ): void; ` ### Parameters ##### options The options to use to create the WalletConnect session. #### Type `let options: CreateWalletConnectSessionOptions; ` ### Returns ##### Return Type `let returnType: void; ` ## darkTheme Create a custom dark theme object by using the default dark theme as a base and applying overrides. ### Example #### Get the default dark theme `const defaultDarkTheme = darkTheme(); ` #### Create a custom dark theme `const customTheme = darkTheme({ colors: { modalBg: "red", }, }); ` ##### Signature `function darkTheme(overrides?: [ThemeOverrides](https://portal.thirdweb.com/references/typescript/v5/ThemeOverrides)): [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Parameters ##### overrides optional The overrides to apply to the default dark theme. #### Type `let overrides: { [key in Exclude]: Partial<[Theme](https://portal.thirdweb.com/references/typescript/v5/Theme)[key]>; }; ` ### Returns ##### Return Type `let returnType: { colors: { accentButtonBg: string; accentButtonText: string; accentText: string; borderColor: string; connectedButtonBg: string; connectedButtonBgHover: string; danger: string; inputAutofillBg: string; modalBg: string; modalOverlayBg: string; primaryButtonBg: string; primaryButtonText: string; primaryText: string; scrollbarBg: string; secondaryButtonBg: string; secondaryButtonHoverBg: string; secondaryButtonText: string; secondaryIconColor: string; secondaryIconHoverBg: string; secondaryIconHoverColor: string; secondaryText: string; selectedTextBg: string; selectedTextColor: string; separatorLine: string; skeletonBg: string; success: string; tertiaryBg: string; tooltipBg: string; tooltipText: string; }; fontFamily: string; type: "light" | "dark"; }; ` Theme object ## decodeError Decodes an error. ### Example `import { decodeError } from "thirdweb/utils"; const data = "0x..."; const error = await decodeError({ contract, data }); ` ##### Signature `` function decodeError(options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }): Promise; `` ### Parameters ##### options The options object. #### Type `` let options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: Promise; ` The decoded error. ## decodeAbiParameters ##### Signature `` function decodeAbiParameters(params: params, data: (`0x${string}`) | (ByteArray)) : {[key in string | number | symbol] : {[key in string | number | symbol] : AbiParameterToPrimitiveType ? params : Array[key], AbiParameterKind>}[key]} `` ### Parameters ##### params #### Type `let params: params; ` ##### data #### Type `` let data: `0x${string}` | ByteArray; `` ### Returns ##### Return Type `let returnType: {[key in string | number | symbol] : {[key in string | number | symbol] : AbiParameterToPrimitiveType ? params : Array[key], AbiParameterKind>}[key]} ` ## decodeFunctionResult Decodes the result of a function call. ### Example `import { decodeFunctionResult } from "thirdweb/utils"; const data = "0x..."; const result = await decodeFunctionResult({ contract, data }); ` ##### Signature `` function decodeFunctionResult(options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }): Promise< ReturnType< ReturnType, undefined, AbiFunction>, "Array" > >; `` ### Parameters ##### options The options object. #### Type `` let options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: Promise< ReturnType< ReturnType, undefined, AbiFunction>, "Array" > >; ` The decoded result. ## decodeFunctionData Decodes the data of a function call. ### Example `import { decodeFunctionData } from "thirdweb/utils"; const data = "0x..."; const decodedData = await decodeFunctionData({ contract, data }); ` ##### Signature `` function decodeFunctionData(options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }): Promise< ReturnType, undefined, AbiFunction>> >; `` ### Parameters ##### options The options object. #### Type `` let options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; data: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: Promise< ReturnType, undefined, AbiFunction>> >; ` The decoded data. ## decodeJWT Decodes a JSON Web Token (JWT) and returns the decoded payload and signature. ### Example `import { decodeJWT } from "thirdweb/utils"; const { payload, signature } = decodeJWT(jwt); ` ##### Signature `` function decodeJWT(jwt: string): { payload: [JWTPayload](https://portal.thirdweb.com/references/typescript/v5/JWTPayload); signature: `0x${string}`; }; `` ### Parameters ##### jwt The JWT string to decode. #### Type `let jwt: string; ` ### Returns ##### Return Type `` let returnType: { payload: [JWTPayload](https://portal.thirdweb.com/references/typescript/v5/JWTPayload); signature: `0x${string}` }; `` An object containing the decoded payload and signature. ## defineChain Defines a chain with the given options. ### Example Just pass the chain ID to connect to: `const chain = defineChain(1); ` Or pass your own RPC or custom values: `const chain = defineChain({ id: 1, rpc: "https://my-rpc.com", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18, }, }); ` ##### Signature `function defineChain( options: number | Chain | [ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) | LegacyChain, ): Readonly; ` ### Parameters ##### options The options for the chain. #### Type `let options: number | Chain | [ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) | LegacyChain; ` ### Returns ##### Return Type `let returnType: Readonly; ` The defined chain. ## computePublishedContractAddress Predicts the implementation address of any published contract ### Example `import { computePublishedContractAddress } from "thirdweb/deploys"; const address = await computePublishedContractAddress({ client, chain, contractId: "AccountFactory", constructorParams, }); ` ##### Signature `function computePublishedContractAddress(args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; contractId: string; publisher?: string; salt?: string; version?: string; }): Promise; ` ### Parameters ##### args The arguments for predicting the address of a published contract. #### Type `let args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; contractId: string; publisher?: string; salt?: string; version?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the predicted address of the contract. ## deployContract Deploy a contract on a given chain ### Example ### Deploying a regular contract from ABI and bytecode `import { deployContract } from "thirdweb/deploys"; const address = await deployContract({ client, chain, bytecode: "0x...", abi: contractAbi, constructorParams: { param1: "value1", param2: 123, }, salt, // optional: salt enables deterministic deploys }); ` ### Deploying a contract deterministically `import { deployContract } from "thirdweb/deploys"; const address = await deployContract({ client, chain, bytecode: "0x...", abi: contractAbi, constructorParams: { param1: "value1", param2: 123, }, salt, // passing a salt will enable deterministic deploys }); ` ##### Signature `` function deployContract( options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; } & { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); salt?: string }, ): Promise; `` ### Parameters ##### options the deploy options #### Type `` let options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; } & { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); salt?: string }; `` ### Returns ##### Return Type `let returnType: Promise; ` * a promise that resolves to the deployed contract address ## deployERC1155Contract Deploys an thirdweb ERC1155 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. ### Example `import { deployERC1155Contract } from "thirdweb/deploys"; const contractAddress = await deployERC1155Contract({ chain, client, account, type: "DropERC1155", params: { name: "MyEdition", description: "My edition contract", symbol: "ME", }); ` ##### Signature `function deployERC1155Contract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC1155ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractParams); type: [ERC1155ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractType); }): Promise; ` ### Parameters ##### options The deployment options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC1155ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractParams); type: [ERC1155ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC1155ContractType); }; ` ### Returns ##### Return Type `let returnType: Promise; ` The deployed contract address. ## deployERC20Contract Deploys an thirdweb ERC20 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. ### Example `import { deployERC20Contract } from "thirdweb/deploys"; const contractAddress = await deployERC20Contract({ chain, client, account, type: "TokenERC20", params: { name: "MyToken", description: "My Token contract", symbol: "MT", }); ` ##### Signature `function deployERC20Contract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC20ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractParams); publisher?: string; type: [ERC20ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractType); }): Promise; ` ### Parameters ##### options The deployment options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC20ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractParams); publisher?: string; type: [ERC20ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC20ContractType); }; ` ### Returns ##### Return Type `let returnType: Promise; ` The deployed contract address. ## deployPackContract Deploy a thirdweb Pack contract ### Example `import { deployPackContract } from "thirdweb/extensions/deploy"; const packAddress = await deployPackContract({ account, client, chain, params: { name: "Pack contract name", symbol: "PACK1155", }, }); ` ##### Signature `function deployPackContract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [PackContractParams](https://portal.thirdweb.com/references/typescript/v5/PackContractParams); }): Promise; ` ### Parameters ##### options params for deploying [Pack contract](https://thirdweb.com/thirdweb.eth/Pack) #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [PackContractParams](https://portal.thirdweb.com/references/typescript/v5/PackContractParams); }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## deployERC721Contract Deploys an thirdweb ERC721 contract of the given type. On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. ### Example `import { deployERC721Contract } from "thirdweb/deploys"; const contractAddress = await deployERC721Contract({ chain, client, account, type: "DropERC721", params: { name: "MyNFT", description: "My NFT contract", symbol: "NFT", }); ` ##### Signature `function deployERC721Contract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC721ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractParams); type: [ERC721ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractType); }): Promise; ` ### Parameters ##### options The deployment options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [ERC721ContractParams](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractParams); type: [ERC721ContractType](https://portal.thirdweb.com/references/typescript/v5/ERC721ContractType); }; ` ### Returns ##### Return Type `let returnType: Promise; ` The deployed contract address. ## deployPublishedContract Deploy an instance of a published contract on a given chain ### Example ### Deploying a published contract `import { deployPublishedContract } from "thirdweb/deploys"; const address = await deployPublishedContract({ client, chain, account, contractId: "MyPublishedContract", contractParams: { param1: "value1", param2: 123, }, publisher: "0x...", // optional, defaults to the thirdweb deployer }); ` ### Deploying a published contract deterministically `import { deployPublishedContract } from "thirdweb/deploys"; const address = await deployPublishedContract({ client, chain, account, contractId: "MyPublishedContract", contractParams: { param1: "value1", param2: 123, }, publisher: "0x...", salt: "your-salt", // this will deterministically deploy the contract at the same address on all chains }); ` ##### Signature `function deployPublishedContract( options: [DeployPublishedContractOptions](https://portal.thirdweb.com/references/typescript/v5/DeployPublishedContractOptions), ): Promise; ` ### Parameters ##### options the deploy options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); contractId: string; contractParams?: Record; implementationConstructorParams?: Record; publisher?: string; salt?: string; version?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` a promise that resolves to the deployed contract address ## prepareDirectDeployTransaction Prepares a direct deploy transaction with ABI. ### Example `import { prepareDirectDeployTransaction } from "thirdweb/deploys"; import { ethereum } from "thirdweb/chains"; const tx = prepareDirectDeployTransaction({ client, chain: ethereum, bytecode: "0x...", constructorAbi: { inputs: [{ type: "uint256", name: "value" }], type: "constructor", }, constructorParams: [123], }); ` ##### Signature `` function prepareDirectDeployTransaction(options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; `` ### Parameters ##### options The options for preparing the transaction. #### Type `` let options: { abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; }; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` * The prepared transaction. ## deploySplitContract Deploys a thirdweb [Split contract](https://thirdweb.com/thirdweb.eth/Split)On chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well. ### Example `` import { deploySplitContract } from "thirdweb/deploys"; const contractAddress = await deploySplitContract({ chain, client, account, params: { name: "Split contract", payees: ["0x...123", "0x...456"], shares: [5100, 4900], // See type `SplitContractParams` for more context }, }); `` ##### Signature `function deploySplitContract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [SplitContractParams](https://portal.thirdweb.com/references/typescript/v5/SplitContractParams); }): Promise; ` ### Parameters ##### options The deployment options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [SplitContractParams](https://portal.thirdweb.com/references/typescript/v5/SplitContractParams); }; ` ### Returns ##### Return Type `let returnType: Promise; ` The deployed contract address. ## prepareDeterministicDeployTransaction Deploy a contract deterministically - will maintain the same address across chains. This is meant to be used with published contracts configured with the 'direct deploy' method. Under the hood, this uses a keyless transaction with a common create2 factory. ### Example `import { prepareDeterministicDeployTransaction } from "thirdweb/deploys"; import { sepolia } from "thirdweb/chains"; const tx = prepareDeterministicDeployTransaction({ client, chain: sepolia, contractId: "AccountFactory", constructorParams: [123], }); ` ##### Signature `function prepareDeterministicDeployTransaction(options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; contractId: string; publisher?: string; salt?: string; version?: string; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options the options to deploy the contract #### Type `let options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); constructorParams?: Record; contractId: string; publisher?: string; salt?: string; version?: string; }; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` * the transaction to deploy the contract ## disconnectWalletConnectSession Disconnects a WalletConnect session. ### Example `import { disconnectWalletConnectSession } from "thirdweb/wallets"; await disconnectWalletConnectSession({ session: mySession, walletConnectClient: wcClient, }); ` ##### Signature `function disconnectWalletConnectSession(options: { session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession); walletConnectClient: SignClient; }): Promise; ` ### Parameters ##### options The options to use to disconnect the WalletConnect session. #### Type `let options: { session: [WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession); walletConnectClient: SignClient; }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## deploySmartAccount Deployes a smart account via a dummy transaction. If the account is already deployed, this will do nothing. ### Example `import { deploySmartAccount } from "thirdweb"; const account = await deploySmartAccount({ smartAccount, chain, client, accountContract, }); ` ##### Signature `` function deploySmartAccount(args: { accountContract: Readonly; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); smartAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); }): Promise< | undefined | { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; } >; `` ### Parameters ##### args Arguments for the deployment. #### Type `let args: { accountContract: Readonly; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); smartAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); }; ` ### Returns ##### Return Type `` let returnType: Promise< | undefined | { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; } >; `` ## download ### Example Download a file from IPFS: `import { download } from "thirdweb/storage"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" }); const file = await download({ client, uri: "ipfs://Qm...", }); ` Download a file from Arweave: `import { download } from "thirdweb/storage"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" }); const file = await download({ client, uri: "ar://{arweave-transaction-id}", }); ` Download a file from HTTP: `import { download } from "thirdweb/storage"; import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" }); const file = await download({ client, uri: "https://example.com/file.txt", }); ` ##### Signature `function download(options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); requestTimeoutMs?: number; uri: string; }): Promise; ` ### Parameters ##### options The download options. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); requestTimeoutMs?: number; uri: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` Asynchronously returns the network response from fetching the file. ## detectMethod Detects if the specified method is present in the contract bytecode. ### Example `import { detectMethod } from "thirdweb/utils/extensions/detect.js"; const hasDecimals = await detectMethod({ method: "function decimals() view returns (uint8)", availableSelectors: ["0x313ce567"], }); ` ##### Signature `function detectMethod(options: DetectExtensionOptions): boolean; ` ### Parameters ##### options The options for detecting the extension. #### Type `let options: DetectExtensionOptions; ` ### Returns ##### Return Type `let returnType: boolean; ` A promise that resolves to a boolean indicating if the extension is detected. ## sendCalls Send [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) calls to a wallet. This function works with all Thirdweb wallets (in-app and smart) and certain injected wallets that already support EIP-5792\. Transactions will be bundled and sponsored when those capabilities are supported, otherwise they will be sent as individual transactions. This function is dependent on the wallet's support for EIP-5792 and could fail. * getCallsStatus for how to retrieve the status of the bundle. * getCapabilities for how to retrieve the capabilities of the wallet. ### Example `import { createThirdwebClient } from "thirdweb"; import { sendCalls } from "thirdweb/wallets/eip5792"; const client = createThirdwebClient({ clientId: ... }); const wallet = createWallet("com.coinbase.wallet"); const sendTx1 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const sendTx2 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709", }); const bundleId = await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], }); ` Sponsor transactions with a paymaster: `` const bundleId = await sendCalls({ wallet, client, calls: [send1, send2], capabilities: { paymasterService: { url: `https://${CHAIN.id}.bundler.thirdweb.com/${client.clientId}` } } }); We recommend proxying any paymaster calls via an API route you setup and control. `` ##### Signature `function sendCalls(options: [SendCallsOptions](https://portal.thirdweb.com/references/typescript/v5/SendCallsOptions)): Promise; ` ### Parameters ##### options #### Type `let options: [SendCallsOptions](https://portal.thirdweb.com/references/typescript/v5/SendCallsOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The ID of the bundle of the calls. ## ecosystemWallet Creates an [ Ecosystem Wallet](https://portal.thirdweb.com/connect/wallet/overview) based on various authentication methods. Full list of available authentication methods [ here](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure) . Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods. Refer to [ inAppWallet](https://portal.thirdweb.com/typescript/v5/inAppWallet) for detailed usage examples. ### Example #### Logging into an ecosystem wallet Below is the general code snippet needed to connect via a given auth strategy to an ecosystem wallet. For more variants on the various auth strategies, refer to [ inAppWallet](https://portal.thirdweb.com/typescript/v5/inAppWallet) . `import { ecosystemWallet } from "thirdweb/wallets"; const wallet = ecosystemWallet("ecosystem.hooli"); const account = await wallet.connect({ client, chain, strategy: "google", }); ` [ View all connection options](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletConnectionOptions) . #### Connect to a restricted ecosystem wallet with your designated partner ID The partner ID will be provided to you by the ecosystem with which you're integrating. `import { ecosystemWallet } from "thirdweb/wallets"; const wallet = ecosystemWallet("ecosystem.hooli", { partnerId: "...", }); ` ##### Signature `` function ecosystemWallet( id: `ecosystem.${string}`, options: [EcosystemWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/EcosystemWalletCreationOptions), ): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<`ecosystem.${string}`>; `` ### Parameters ##### id #### Type `` let id: `ecosystem.${string}`; `` ##### options #### Type `let options: { auth?: { defaultSmsCountryCode?: SupportedSmsCountry; mode?: "popup" | "redirect" | "window"; redirectUrl?: string; }; partnerId?: string; storage?: [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage); }; ` ### Returns ##### Return Type `` let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<`ecosystem.${string}`>; `` The created ecosystem wallet. ## toProvider Converts a Thirdweb wallet into an EIP-1193 compatible provider. This adapter allows you to use a Thirdweb wallet with any library or dApp that expects an EIP-1193 provider. The provider implements the standard EIP-1193 interface including request handling and event subscription. ### Example `import { EIP1193 } from "thirdweb/wallets"; // Create an EIP-1193 provider from a Thirdweb wallet const provider = EIP1193.toProvider({ wallet, chain: ethereum, client: createThirdwebClient({ clientId: "..." }), }); // Use with any EIP-1193 compatible library const accounts = await provider.request({ method: "eth_requestAccounts", }); // Listen for events provider.on("accountsChanged", (accounts) => { console.log("Active accounts:", accounts); }); ` ##### Signature `function toProvider( options: [ToEip1193ProviderOptions](https://portal.thirdweb.com/references/typescript/v5/ToEip1193ProviderOptions), ): [EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider); ` ### Parameters ##### options Configuration options for creating the provider #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectOverride?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => Promise; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ### Returns ##### Return Type `let returnType: { request: (params: any) => Promise; on: (event: any, listener: (params: any) => any) => void; removeListener: ( event: any, listener: (params: any) => any, ) => void; }; ` An EIP-1193 compatible provider that wraps the Thirdweb wallet ## fromProvider Creates a Thirdweb wallet from an EIP-1193 compatible provider. This adapter allows you to use any EIP-1193 provider (like MetaMask, WalletConnect, etc.) as a Thirdweb wallet. It handles all the necessary conversions between the EIP-1193 interface and Thirdweb's wallet interface. ### Example `import { EIP1193 } from "thirdweb/wallets"; // Create a Thirdweb wallet from MetaMask's provider const wallet = EIP1193.fromProvider({ provider: window.ethereum, walletId: "io.metamask", }); // Use like any other Thirdweb wallet const account = await wallet.connect({ client: createThirdwebClient({ clientId: "..." }), }); // Sign messages await account.signMessage({ message: "Hello World" }); // Send transactions await account.sendTransaction({ to: "0x...", value: 1000000000000000000n, }); ` ##### Signature `function fromProvider(options: [FromEip1193AdapterOptions](https://portal.thirdweb.com/references/typescript/v5/FromEip1193AdapterOptions)): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ### Parameters ##### options Configuration options for creating the wallet adapter #### Type `let options: { provider: [EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider) | (() => Promise<[EIP1193Provider](https://portal.thirdweb.com/references/typescript/v5/EIP1193Provider)>); walletId?: [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); }; ` ### Returns ##### Return Type `let returnType: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` A Thirdweb wallet instance that wraps the EIP-1193 provider ## useSendCalls A hook to send [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) calls to a wallet. This hook works with all Thirdweb wallets (in-app and smart) and certain injected wallets that already support EIP-5792\. Transactions will be bundled and sponsored when those capabilities are supported, otherwise they will be sent as individual transactions. When calls are sent, all contracts that are interacted with will have their corresponding reads revalidated via React Query. This hook is dependent on the wallet's support for EIP-5792 and could fail. The mutatuon function will use your currently connected wallet by default, but you can pass it a specific wallet to use if you'd like. ### Example `import { useSendCalls } from "thirdweb/react"; const sendTx1 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x33d9B8BEfE81027E2C859EDc84F5636cbb202Ed6", }); const sendTx2 = approve({ contract: USDT_CONTRACT, amount: 100, spender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709", }); const { mutate: sendCalls, data: bundleId } = useSendCalls({ client, }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], }); ` Await the bundle's full confirmation: `const { mutate: sendCalls, data: bundleId } = useSendCalls({ client, waitForResult: true, }); await sendCalls({ wallet, client, calls: [sendTx1, sendTx2], }); ` Sponsor transactions with a paymaster: `` const { mutate: sendCalls, data: bundleId } = useSendCalls(); await sendCalls({ client, calls: [sendTx1, sendTx2], capabilities: { paymasterService: { url: `https://${CHAIN.id}.bundler.thirdweb.com/${client.clientId}`, }, }, }); `` We recommend proxying any paymaster calls via an API route you setup and control. ##### Signature `function useSendCalls(__namedParameters: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); waitForResult?: boolean; }): UseMutationResult< string | [GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse), Error, Omit<[SendCallsOptions](https://portal.thirdweb.com/references/typescript/v5/SendCallsOptions), "chain" | "wallet"> & { wallet?: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) } >; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); waitForResult?: boolean; }; ` ### Returns ##### Return Type `let returnType: UseMutationResult< string | [GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse), Error, Omit<[SendCallsOptions](https://portal.thirdweb.com/references/typescript/v5/SendCallsOptions), "chain" | "wallet"> & { wallet?: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) } >; ` A React Query mutatuon object to interact with sendCalls ## useCallsStatus A hook to get a call bundle's current status according to [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) . This function is dependent on the wallet's support for EIP-5792 and could throw an error if it's not supported. ### Example `import { useCallsStatus } from "thirdweb/react"; const { data: status, isLoading } = useCallsStatus({ bundleId, client, }); ` ##### Signature `function useCallsStatus(options: { bundleId: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); queryOptions?: { enabled?: boolean; retry?: number }; }): UseQueryResult<[GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse)>; ` ### Parameters ##### options #### Type `let options: { bundleId: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); queryOptions?: { enabled?: boolean; retry?: number }; }; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse)>; ` a React Query object. ## getCallsStatus Get the status of an [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) bundle. This function is dependent on the wallet's support for EIP-5792 and could fail. ### Example `import { createThirdwebClient } from "thirdweb"; import { sendCalls, getCallsStatus } from "thirdweb/wallets/eip5792"; const client = createThirdwebClient({ clientId: ... }); const bundleId = await sendCalls({ wallet, client, calls }); let result; while (result.status !== "CONFIRMED") { result = await getCallsStatus({ wallet, client, bundleId }); } ` ##### Signature `function getCallsStatus( options: [GetCallsStatusOptions](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusOptions), ): Promise<[GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse)>; ` ### Parameters ##### options #### Type `let options: { bundleId: [WalletSendCallsId](https://portal.thirdweb.com/references/typescript/v5/WalletSendCallsId); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ### Returns ##### Return Type `let returnType: { receipts: Array<[WalletCallReceipt](https://portal.thirdweb.com/references/typescript/v5/WalletCallReceipt)>; status: "PENDING" | "CONFIRMED"; }; ` * A promise that resolves to the bundle's status and receipts (if available). GetCallsStatusResponse ## getCapabilities Get the capabilities of a wallet based on the [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) specification. This function is dependent on the wallet's support for EIP-5792, but will not throw. _The returned object contains a `message` field detailing any issues with the wallet's support for EIP-5792._ ### Example `import { getCapabilities } from "thirdweb/wallets/eip5792"; const wallet = createWallet("com.coinbase.wallet"); const capabilities = await getCapabilities({ wallet }); ` ##### Signature `function getCapabilities( options: [GetCapabilitiesOptions](https://portal.thirdweb.com/references/typescript/v5/GetCapabilitiesOptions), ): Promise<{ message?: string }>; ` ### Parameters ##### options #### Type `let options: [GetCapabilitiesOptions](https://portal.thirdweb.com/references/typescript/v5/GetCapabilitiesOptions); ` ### Returns ##### Return Type `let returnType: Promise<{ message?: string }>; ` * A promise that resolves to the capabilities of the wallet based on the [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) spec. ## encode Encodes a transaction object into a hexadecimal string representation of the encoded data. ### Example `import { encode } from "thirdweb"; const encodedData = await encode(transaction); ` ##### Signature `` function encode( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ): Promise<`0x${string}`>; `` ### Parameters ##### transaction The transaction object to encode. #### Type `let transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the encoded data as a hexadecimal string. ## waitForBundle Waits for the [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) bundle to be confirmed. This function is dependent on the wallet's support for EIP-5792 and could fail. ### Example `import { waitForBundle } from "thirdweb/wallets/eip5792"; const result = await waitForBundle({ client, chain, wallet, bundleId: "0x123...", }); ` ##### Signature `function waitForBundle(options: { bundleId: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }): Promise<[GetCallsStatusResponse](https://portal.thirdweb.com/references/typescript/v5/GetCallsStatusResponse)>; ` ### Parameters ##### options The options for waiting for the bundle. By default, the max wait time is 100 blocks. #### Type `let options: { bundleId: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }; ` ### Returns ##### Return Type `let returnType: { receipts: Array<[WalletCallReceipt](https://portal.thirdweb.com/references/typescript/v5/WalletCallReceipt)>; status: "PENDING" | "CONFIRMED"; }; ` A promise that resolves with the final getCallsStatus result. ## encodeAbiParameters Encodes the given ABI parameters and values into a hexadecimal string. ### Example `import { encodeAbiParameters } from "viem"; const params = [ { name: "param1", type: "uint256" }, { name: "param2", type: "string" }, ]; const values = [123, "hello"]; const data = encodeAbiParameters(params, values); console.log(data); ` ##### Signature `` function encodeAbiParameters(params: TParams, values: TParams extends readonly Array ? {[key in string | number | symbol] : {[key in string | number | symbol] : AbiParameterToPrimitiveType[key], AbiParameterKind>}[key]} : never) : `0x${string}` `` ### Parameters ##### params The ABI parameters. #### Type `let params: TParams; ` ##### values The corresponding values for the ABI parameters. #### Type `let values: TParams extends readonly Array ? {[key in string | number | symbol] : {[key in string | number | symbol] : AbiParameterToPrimitiveType[key], AbiParameterKind>}[key]} : never ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded ABI parameters as a hexadecimal string. ## encodeJWT Builds a JSON Web Token (JWT) using the provided options. ### Example `import { encodeJWT } from "thirdweb/utils"; const jwt = await encodeJWT({ payload: { iss: "0x1234567890123456789012345678901234567890", sub: "0x1234567890123456789012345678901234567890", aud: "0x1234567890123456789012345678901234567890", exp: new Date(Date.now() + 1000 * 60 * 60), nbf: new Date(), iat: new Date(), jti: "1234567890", ctx: { example: "example", }, }, wallet, }); ` ##### Signature `function encodeJWT(options: EncodeJWTParams): Promise; ` ### Parameters ##### options The options for building the JWT. #### Type `let options: EncodeJWTParams; ` ### Returns ##### Return Type `let returnType: Promise; ` The generated JWT. ## encodePacked ##### Signature `` function encodePacked( types: packedAbiTypes, values: EncodePackedValues, ): `0x${string}`; `` ### Parameters ##### types #### Type `let types: packedAbiTypes; ` ##### values #### Type `let values: EncodePackedValues; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` ## parseNftUri Parses an NFT URI. ### Example `import { parseNftUri } from "thirdweb/utils/ens"; const nftUri = await parseNftUri({ client, uri: "eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063", }); console.log(nftUri); // ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/ ` ##### Signature `function parseNftUri(options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string; }): Promise; ` ### Parameters ##### options The options for parsing an NFT URI. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the NFT URI, or null if the URI could not be parsed. ## engineAccount Creates an account that uses your engine backend wallet for sending transactions and signing messages. ### Example `import { engineAccount } from "thirdweb/wallets/engine"; const engineAcc = engineAccount({ engineUrl: "https://engine.thirdweb.com", authToken: "your-auth-token", walletAddress: "0x...", }); // then use the account as you would any other account const transaction = claimTo({ contract, to: "0x...", quantity: 1n, }); const result = await sendTransaction({ transaction, account: engineAcc, }); console.log("Transaction sent:", result.transactionHash); ` ##### Signature `function engineAccount(options: [EngineAccountOptions](https://portal.thirdweb.com/references/typescript/v5/EngineAccountOptions)): [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ### Parameters ##### options The options for the engine account. #### Type `let options: { authToken: string; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); engineUrl: string; walletAddress: string; }; ` ### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` An account that uses your engine backend wallet. ## parseAvatarRecord Parses an ENS or similar avatar record. Supports NFT URIs, IPFS scheme, and HTTPS URIs. ### Example `import { parseAvatarRecord } from "thirdweb/utils/ens"; const avatarUrl = await parseAvatarRecord({ client, uri: "ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/", }); console.log(avatarUrl); // "https://ipfs.io/ipfs/bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/" const avatarUrl2 = await parseAvatarRecord({ client, uri: "eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063", }); console.log(avatarUrl2); // "https://opensea.io/assets/0xb32979486938aa9694bfc898f35dbed459f44424/10063" ` ##### Signature `function parseAvatarRecord( options: [ParseAvatarOptions](https://portal.thirdweb.com/references/typescript/v5/ParseAvatarOptions), ): Promise; ` ### Parameters ##### options The options for parsing an ENS avatar record. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the avatar URL, or null if the URI could not be parsed. ## resolveAddress Resolves an ENS name to an Ethereum address. ### Example `import { resolveAddress } from "thirdweb/extensions/ens"; const address = await resolveAddress({ client, name: "vitalik.eth", }); ` Resolve an address to a Basename. `import { resolveAddress, BASENAME_RESOLVER_ADDRESS, } from "thirdweb/extensions/ens"; import { base } from "thirdweb/chains"; const address = await resolveAddress({ client, name: "myk.base.eth", resolverAddress: BASENAME_RESOLVER_ADDRESS, resolverChain: base, }); ` ##### Signature `` function resolveAddress( options: [ResolveAddressOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveAddressOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for resolving an ENS address. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the Ethereum address. ## resolveAvatar Resolves an ENS name to the avatar URL. ### Example `import { resolveAvatar } from "thirdweb/extensions/ens"; const address = await resolveAvatar({ client, name: "vitalik.eth", }); ` ##### Signature `function resolveAvatar( options: [ResolveAvatarOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveAvatarOptions), ): Promise; ` ### Parameters ##### options The options for resolving an ENS address. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the avatar url, or null if not set. ## resolveL2Name Resolves the L2 name for a specified address. ### Example `import { resolveL2Name } from "thirdweb/extensions/ens"; const name = await resolveL2Name({ client, address: "0x1234...", resolverAddress: "0x...", resolverChain: base, }); ` Resolve a Basename. `import { resolveL2Name, BASENAME_RESOLVER_ADDRESS, } from "thirdweb/extensions/ens"; import { base } from "thirdweb/chains"; const name = await resolveL2Name({ client, address: "0x1234...", resolverAddress: BASENAME_RESOLVER_ADDRESS, resolverChain: base, }); ` ##### Signature `function resolveL2Name( options: [ResolveL2NameOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveL2NameOptions), ): Promise; ` ### Parameters ##### options The options for resolving an L2 ENS address. #### Type `let options: { address: Address; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress: string; resolverChain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the Ethereum address. ## resolveName Resolves the primary name for a specified address. ### Example `import { resolveName } from "thirdweb/extensions/ens"; const name = await resolveName({ client, address: "0x1234...", }); ` ##### Signature `function resolveName( options: [ResolveNameOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveNameOptions), ): Promise; ` ### Parameters ##### options The options for resolving an ENS address. #### Type `let options: { address: Address; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the Ethereum address. ## resolveText Resolves an ENS name and key to the specified record. ### Example `import { resolveText } from "thirdweb/extensions/ens"; const twitterUsername = await resolveText({ client, name: "vitalik.eth", key: "com.twitter", }); ` ##### Signature `function resolveText( options: [ResolveTextOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveTextOptions), ): Promise; ` ### Parameters ##### options The options for resolving an ENS address. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); key: string; name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the text record. ## useEnsAvatar Get the ENS avatar for an ENS name ### Example `import { useEnsAvatar } from "thirdweb/react"; const { data: ensAvatar } = useEnsAvatar({ client, ensName: "my-ens-name.eth", }); ` ##### Signature `function useEnsAvatar(options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ensName: undefined | null | string; }): UseQueryResult; ` ### Parameters ##### options the client and ENS name to get the avatar for #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ensName: undefined | null | string; }; ` ### Returns ##### Return Type `let returnType: UseQueryResult; ` * a query object that resolves to the avatar ## ensureBytecodePrefix Ensures that the given bytecode has the correct prefix. If the bytecode already starts with "0x", it is returned as is. Otherwise, the prefix "0x" is added to the bytecode. ### Example `import { ensureBytecodePrefix } from "thirdweb/utils/bytecode/prefix"; const bytecode = "363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"; const prefixedBytecode = ensureBytecodePrefix(bytecode); console.log(prefixedBytecode); ` ##### Signature `` function ensureBytecodePrefix(bytecode: string): `0x${string}`; `` ### Parameters ##### bytecode The bytecode to ensure the prefix for. #### Type `let bytecode: string; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The bytecode with the correct prefix. ## useEnsName Get the ENS name and avatar for an address ### Example `import { useEnsName } from "thirdweb/react"; const { data: ensName } = useEnsName({ client, address: "0x1234...", }); ` ##### Signature `function useEnsName(options: { address: undefined | string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }): UseQueryResult; ` ### Parameters ##### options the client and address to get the ENS name and avatar for #### Type `let options: { address: undefined | string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: UseQueryResult; ` * a query object that resolves to the ENS name ## approvalForAllEvent Creates an event object for the ApprovalForAll event. ### Example `import { getContractEvents } from "thirdweb"; import { approvalForAllEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ approvalForAllEvent({ _owner: ..., _operator: ..., }) ], }); ` ##### Signature `function approvalForAllEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly name: "_approved"; readonly type: "bool" }, ]; readonly name: "ApprovalForAll"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly name: "_approved"; readonly type: "bool" }, ]; readonly name: "ApprovalForAll"; readonly type: "event"; }>; ` The prepared event object. ## balanceOf Calls the "balanceOf" function on the contract. ### Example `import { balanceOf } from "thirdweb/extensions/erc1155"; const result = await balanceOf({ contract, owner: ..., tokenId: ..., }); ` ##### Signature `function balanceOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>, ): Promise; ` ### Parameters ##### options The options for the balanceOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## batchMetadataUpdateEvent Creates an event object for the BatchMetadataUpdate event. ### Example `import { getContractEvents } from "thirdweb"; import { batchMetadataUpdateEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [batchMetadataUpdateEvent()], }); ` ##### Signature `function batchMetadataUpdateEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_fromTokenId"; readonly type: "uint256" }, { readonly name: "_toTokenId"; readonly type: "uint256" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_fromTokenId"; readonly type: "uint256" }, { readonly name: "_toTokenId"; readonly type: "uint256" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` The prepared event object. ## balanceOfBatch Calls the "balanceOfBatch" function on the contract. ### Example `import { balanceOfBatch } from "thirdweb/extensions/erc1155"; const result = await balanceOfBatch({ contract, owners: ..., tokenIds: ..., }); ` ##### Signature `function balanceOfBatch(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfBatchParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfBatchParams)>) : Promise> ` ### Parameters ##### options The options for the balanceOfBatch function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfBatchParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfBatchParams)>; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## burn Prepares a transaction to call the "burn" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { burn } from "thirdweb/extensions/erc1155"; const transaction = burn({ contract, account: ..., id: ..., value: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function burn( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "burn" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## burnBatch Prepares a transaction to call the "burnBatch" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { burnBatch } from "thirdweb/extensions/erc1155"; const transaction = burnBatch({ contract, account: ..., ids: ..., values: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function burnBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnBatchParams](https://portal.thirdweb.com/references/typescript/v5/BurnBatchParams) | { asyncParams: () => Promise<[BurnBatchParams](https://portal.thirdweb.com/references/typescript/v5/BurnBatchParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "burnBatch" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnBatchParams](https://portal.thirdweb.com/references/typescript/v5/BurnBatchParams) | { asyncParams: () => Promise<[BurnBatchParams](https://portal.thirdweb.com/references/typescript/v5/BurnBatchParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## canClaim Check if a user can claim a drop. ### Example `const claimResult = await canClaim({ contract: contract, claimer: "0x1234567890123456789012345678901234567890", quantity: "1", tokenId: 0n, }); ` ##### Signature `function canClaim( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>, ): Promise<[CanClaimResult](https://portal.thirdweb.com/references/typescript/v5/CanClaimResult)>; ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>; ` ### Returns ##### Return Type `let returnType: { reason?: string; result: boolean }; ` Whether the user can claim the drop. ## createPack Prepares a transaction to call the "createPack" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { createPack } from "thirdweb/extensions/erc1155"; const transaction = createPack({ contract, contents: ..., numOfRewardUnits: ..., packUri: ..., openStartTimestamp: ..., amountDistributedPerOpen: ..., recipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function createPack( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams) | { asyncParams: () => Promise<[CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "createPack" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams) | { asyncParams: () => Promise<[CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## claimTo Claim ERC1155 NFTs to a specified address ### Example #### Basic usage `import { claimTo } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = claimTo({ contract, to: "0x...", tokenId: 0n, quantity: 1n, }); await sendTransaction({ transaction, account }); ` #### For Drops with allowlists You need to specify the claimer address as the `from` param to avoid any issue with the allowlist `const transaction = claimTo({ contract, to: "0x...", tokenId: 0n, quantity: 1n, from: "0x...", // address of the one claiming }); ` ##### Signature `function claimTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The prepared transaction ## encodeSafeTransferFrom Encodes the "safeTransferFrom" function into a Hex string with its parameters. ### Example `import { encodeSafeTransferFrom } from "thirdweb/extensions/erc1155"; const result = encodeSafeTransferFrom({ from: ..., to: ..., tokenId: ..., value: ..., data: ..., }); ` ##### Signature `` function encodeSafeTransferFrom( options: [SafeTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeTransferFromParams), ): `0xf242432a${string}`; `` ### Parameters ##### options The options for the safeTransferFrom function. #### Type `let options: WithOverrides<{ data: AbiParameterToPrimitiveType<{ name: "_data"; type: "bytes" }>; from: AbiParameterToPrimitiveType<{ name: "_from"; type: "address"; }>; to: AbiParameterToPrimitiveType<{ name: "_to"; type: "address" }>; tokenId: AbiParameterToPrimitiveType<{ name: "tokenId"; type: "uint256"; }>; value: AbiParameterToPrimitiveType<{ name: "_value"; type: "uint256"; }>; }>; ` ### Returns ##### Return Type `` let returnType: `0xf242432a${string}`; `` The encoded hexadecimal string. ## freezeMetadata Prepares a transaction to call the "freezeMetadata" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { freezeMetadata } from "thirdweb/extensions/erc1155"; const transaction = freezeMetadata(); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function freezeMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "freezeMetadata" function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## generateMintSignature Generates the payload and signature for minting an ERC1155 token. ### Example `import { mintWithSignature, generateMintSignature, } from "thirdweb/extensions/erc1155"; const { payload, signature } = await generateMintSignature({ account, contract, mintRequest: { to: "0x...", quantity: 10n, metadata: { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, }, }); const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise<{ payload: { currency: string; pricePerToken: bigint; primarySaleRecipient: string; quantity: bigint; royaltyBps: bigint; royaltyRecipient: string; to: string; tokenId: bigint; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; }>; `` ### Parameters ##### options The options for the minting process. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ payload: { currency: string; pricePerToken: bigint; primarySaleRecipient: string; quantity: bigint; royaltyBps: bigint; royaltyRecipient: string; to: string; tokenId: bigint; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; }>; `` A promise that resolves to the payload and signature. ## getActiveClaimCondition Retrieves the active claim condition. ### Example `import { getActiveClaimCondition } from "thirdweb/extensions/erc1155"; const activeClaimCondition = await getActiveClaimCondition({ contract, tokenId, }); ` ##### Signature `function getActiveClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the active claim condition. ## getClaimConditionById Calls the "getClaimConditionById" function on the contract. ### Example `import { getClaimConditionById } from "thirdweb/extensions/erc1155"; const result = await getClaimConditionById({ contract, tokenId: ..., conditionId: ..., }); ` ##### Signature `` function getClaimConditionById( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>, ): Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` ### Parameters ##### options The options for the getClaimConditionById function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` The parsed result of the function call. ## getClaimConditions Retrieves all claim conditions. ### Example `import { getClaimConditions } from "thirdweb/extensions/erc1155"; const conditions = await getClaimConditions({ contract, tokenId: 1n, }); ` ##### Signature `function getClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionsParams)>, ): Promise>; ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionsParams)>; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to all claim conditions. ## getNFT Retrieves information about a specific ERC1155 non-fungible token (NFT). ### Example `import { getNFT } from "thirdweb/extensions/erc1155"; const nft = await getNFT({ contract, tokenId: 1n, }); ` ##### Signature `function getNFT( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTParams)>, ): Promise<[NFT](https://portal.thirdweb.com/references/typescript/v5/NFT)>; ` ### Parameters ##### options The options for retrieving the NFT. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTParams)>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to the NFT object. ## getNFTs Retrieves an array of NFTs ("ERC1155") based on the provided options. ### Example `import { getNFTs } from "thirdweb/extensions/erc1155"; const nfts = await getNFTs({ contract, start: 0, count: 10, }); ` ##### Signature `function getNFTs( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTsParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTsParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the NFTs. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTsParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTsParams)>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to an array of NFTs. ## getOwnedNFTs Retrieves the owned ERC1155 NFTs for a given wallet address. ### Example `import { getOwnedNFTs } from "thirdweb/extensions/erc1155"; const nfts = await getOwnedNFTs({ contract, start: 0, count: 10, address: "0x123...", }); ` ##### Signature `function getOwnedNFTs( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams)>, ): Promise>; ` ### Parameters ##### options The transaction options and parameters. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams)>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to an array of ERC1155 NFTs owned by the wallet address, along with the quantity owned. ## isBurnSupported Checks if the `burn` method is supported by the given contract. ### Example `import { isBurnSupported } from "thirdweb/extensions/erc1155"; const supported = isBurnSupported(["0x..."]); ` ##### Signature `function isBurnSupported(availableSelectors: Array): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `burn` method is supported. ## getOwnedTokenIds Retrieves the owned ERC1155 tokenIds & the owned balance of each tokenId for a given wallet address. ### Example `import { getOwnedNFTs } from "thirdweb/extensions/erc1155"; const ownedTokenIds = await getOwnedTokenIds({ contract, start: 0, count: 10, address: "0x123...", }); ` ##### Signature `function getOwnedTokenIds( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams)>, ): Promise>; ` ### Parameters ##### options The transaction options and parameters. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOwnedTokenIdsParams](https://portal.thirdweb.com/references/typescript/v5/GetOwnedTokenIdsParams)>; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to an array of ERC1155 NFTs owned by the wallet address, along with the quantity owned. ## isApprovedForAll Calls the "isApprovedForAll" function on the contract. ### Example `import { isApprovedForAll } from "thirdweb/extensions/erc1155"; const result = await isApprovedForAll({ contract, owner: ..., operator: ..., }); ` ##### Signature `function isApprovedForAll( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsApprovedForAllParams](https://portal.thirdweb.com/references/typescript/v5/IsApprovedForAllParams)>, ): Promise; ` ### Parameters ##### options The options for the isApprovedForAll function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsApprovedForAllParams](https://portal.thirdweb.com/references/typescript/v5/IsApprovedForAllParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isClaimToSupported Checks if the `claimTo` method is supported by the given contract. ### Example `import { isClaimToSupported } from "thirdweb/extensions/erc1155"; const supported = isClaimToSupported(["0x..."]); ` ##### Signature `function isClaimToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `claimTo` method is supported. ## isERC1155 Check if a contract supports the ERC1155 interface. ### Example `import { isERC1155 } from "thirdweb/extensions/erc1155"; const result = await isERC1155({ contract }); ` ##### Signature `function isERC1155(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating whether the contract supports the ERC1155 interface. ## isGetActiveClaimConditionSupported Checks if the `getActiveClaimCondition` method is supported by the given contract. ### Example `import { isGetActiveClaimConditionSupported } from "thirdweb/extensions/erc1155"; const supported = isGetActiveClaimConditionSupported(["0x..."]); ` ##### Signature `function isGetActiveClaimConditionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getActiveClaimCondition` method is supported. ## isGetClaimConditionByIdSupported Checks if the `getClaimConditionById` method is supported by the given contract. ### Example `import { isGetClaimConditionByIdSupported } from "thirdweb/extensions/erc1155"; const supported = isGetClaimConditionByIdSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionByIdSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditionById` method is supported. ## isGetClaimConditionsSupported Checks if the `getClaimConditions` method is supported by the given contract. ### Example `import { isGetClaimConditionsSupported } from "thirdweb/extensions/erc1155"; const supported = isGetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditions` method is supported. ## useCapabilities A hook to get the current wallet's capabilities according to [ EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) . This function is dependent on the wallet's support for EIP-5792, but will not throw. _The returned object contains a `message` field detailing any issues with the wallet's support for EIP-5792._ ### Example `import { useCapabilities } from "thirdweb/react"; const { data: capabilities, isLoading } = useCapabilities(); ` ##### Signature `function useCapabilities(options?: { queryOptions?: { enabled?: boolean; retry?: number }; }): UseQueryResult<{ message?: string }>; ` ### Parameters ##### options optional #### Type `let options: { queryOptions?: { enabled?: boolean; retry?: number } }; ` ### Returns ##### Return Type `let returnType: UseQueryResult<{ message?: string }>; ` a React Query object. ## isGetNFTsSupported Checks if the `getNFTs` method is supported by the given contract. ### Example `import { isGetNFTsSupported } from "thirdweb/extensions/erc721"; const supported = isGetNFTsSupported(["0x..."]); ` ##### Signature `function isGetNFTsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getNFTs` method is supported. ## isLazyMintSupported Checks if the `lazyMint` method is supported by the given contract. ### Example `import { isLazyMintSupported } from "thirdweb/extensions/erc1155"; const supported = isLazyMintSupported(["0x..."]); ` ##### Signature `function isLazyMintSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `lazyMint` method is supported. ## isGetNFTSupported Checks if the `uri` method is supported by the given contract. ### Example `import { isUriSupported } from "thirdweb/extensions/erc1155"; const supported = isUriSupported(["0x..."]); ` ##### Signature `function isGetNFTSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `uri` method is supported. ## isResetClaimEligibilitySupported Checks if the `resetClaimEligibility` method is supported by the given contract. ### Example `import { isResetClaimEligibilitySupported } from "thirdweb/extensions/erc1155"; const supported = isResetClaimEligibilitySupported(["0x..."]); ` ##### Signature `function isResetClaimEligibilitySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `resetClaimEligibility` method is supported. ## isMintToSupported Checks if the `mintTo` method is supported by the given contract. ### Example `import { isMintToSupported } from "thirdweb/extensions/erc1155"; const supported = isMintToSupported(["0x..."]); ` ##### Signature `function isMintToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `mintTo` method is supported. ## isMintAdditionalSupplyToSupported Checks if the `mintAdditionalSupplyTo` method is supported by the given contract. ### Example `import { isMintAdditionalSupplyToSupported } from "thirdweb/extensions/erc1155"; const supported = isMintAdditionalSupplyToSupported(["0x..."]); ` ##### Signature `function isMintAdditionalSupplyToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `mintAdditionalSupplyTo` method is supported. ## isNextTokenIdToMintSupported Checks if the `nextTokenIdToMint` method is supported by the given contract. ### Example `import { isNextTokenIdToMintSupported } from "thirdweb/extensions/erc1155"; const supported = isNextTokenIdToMintSupported(["0x..."]); ` ##### Signature `function isNextTokenIdToMintSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `nextTokenIdToMint` method is supported. ## isSetClaimConditionsSupported Checks if the `setClaimConditions` method is supported by the given contract. ### Example `import { isSetClaimConditionsSupported } from "thirdweb/extensions/erc1155"; const supported = isSetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isSetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setClaimConditions` method is supported. ## isUpdateTokenURISupported Checks if the `setTokenURI` method is supported by the given contract. ### Example `import { isSetTokenURISupported } from "thirdweb/extensions/erc1155"; const supported = isSetTokenURISupported(["0x..."]); ` ##### Signature `function isUpdateTokenURISupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setTokenURI` method is supported. ## isTotalSupplySupported Checks if the `totalSupply` method is supported by the given contract. ### Example `import { isTotalSupplySupported } from "thirdweb/extensions/erc1155"; const supported = isTotalSupplySupported(["0x..."]); ` ##### Signature `function isTotalSupplySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `totalSupply` method is supported. ## lazyMint Lazily mints ERC1155 tokens. ### Example `import { lazyMint } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = lazyMint({ contract, nfts: [ { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function lazyMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[LazyMintParams](https://portal.thirdweb.com/references/typescript/v5/LazyMintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the lazy minting process. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[LazyMintParams](https://portal.thirdweb.com/references/typescript/v5/LazyMintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared contract call. ## metadataUpdateEvent Creates an event object for the MetadataUpdate event. ### Example `import { getContractEvents } from "thirdweb"; import { metadataUpdateEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [metadataUpdateEvent()], }); ` ##### Signature `function metadataUpdateEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_tokenId"; readonly type: "uint256" }, ]; readonly name: "MetadataUpdate"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_tokenId"; readonly type: "uint256" }, ]; readonly name: "MetadataUpdate"; readonly type: "event"; }>; ` The prepared event object. ## metadataFrozenEvent Creates an event object for the MetadataFrozen event. ### Example `import { getContractEvents } from "thirdweb"; import { metadataFrozenEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [metadataFrozenEvent()], }); ` ##### Signature `function metadataFrozenEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly []; readonly name: "MetadataFrozen"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly []; readonly name: "MetadataFrozen"; readonly type: "event"; }>; ` The prepared event object. ## mintAdditionalSupplyTo Mints a "supply" number of additional ERC1155 tokens to the specified "to" address. ### Example `import { mintAdditionalSupplyTo } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = mintAdditionalSupplyTo({ contract, to: "0x...", tokenId: 1n, supply: 10n, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintAdditionalSupplyTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintAdditionalSupplyToParams](https://portal.thirdweb.com/references/typescript/v5/MintAdditionalSupplyToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintAdditionalSupplyToParams](https://portal.thirdweb.com/references/typescript/v5/MintAdditionalSupplyToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## mintTo Mints a "supply" number of new ERC1155 tokens to the specified "to" address. If the `nft` parameter is a string, it will be used as the token URI. If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI. ### Example `import { mintTo } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = mintTo({ contract, to: "0x...", supply: 10n, nft: { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## mintAdditionalSupplyToBatch This extension batches multiple `mintAdditionalSupplyToBatch` extensions into one single multicall. Keep in mind that there is a limit of how many NFTs you can mint per transaction. This limit varies depends on the network that you are transacting on. You are recommended to experiment with the number to figure out the best number for your chain of choice. ### Example `import { mintAdditionalSupplyToBatch } from "thirdweb/extensions/erc1155"; const transaction = mintAdditionalSupplyToBatch({ contract, nfts: [ { tokenId: 0n, supply: 99n, to: account.address }, { tokenId: 1n, supply: 98n, to: account.address }, { tokenId: 2n, supply: 97n, to: account.address }, ], }); ` ##### Signature `function mintAdditionalSupplyToBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintAdditionalSupplyToBatchParams](https://portal.thirdweb.com/references/typescript/v5/MintAdditionalSupplyToBatchParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintAdditionalSupplyToBatchParams](https://portal.thirdweb.com/references/typescript/v5/MintAdditionalSupplyToBatchParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ## mintToBatch This extension batches multiple `mintTo` extensions into one single multicall. Keep in mind that there is a limit of how many NFTs you can mint per transaction. This limit varies depends on the network that you are transacting on. You are recommended to experiment with the number to figure out the best number for your chain of choice. ### Example `import { mintBatchTo } from "thirdweb/extension/erc1155"; const transaction = mintToBatch({ contract: editionContract, to: "0x...", nfts: [ { metadata: { name: "Token #0", image: "...", attributes: [], }, supply: 100n, }, { metadata: { name: "Token #1", image: "...", attributes: [], }, supply: 111n, }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintToBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToBatchParams](https://portal.thirdweb.com/references/typescript/v5/MintToBatchParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options the transaction options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToBatchParams](https://portal.thirdweb.com/references/typescript/v5/MintToBatchParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## mintWithSignature Mints a new ERC1155 token with the given minter signature ### Example `import { mintWithSignature, generateMintSignature } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const { payload, signature } = await generateMintSignature(...) const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## nextTokenId Calls the "nextTokenId" function on the contract. ### Example `import { nextTokenId } from "thirdweb/extensions/erc1155"; const result = await nextTokenId({ contract, }); ` ##### Signature `function nextTokenId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the nextTokenId function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## nextTokenIdToMint Calls the "nextTokenIdToMint" function on the contract. ### Example `import { nextTokenIdToMint } from "thirdweb/extensions/erc1155"; const result = await nextTokenIdToMint({ contract, }); ` ##### Signature `function nextTokenIdToMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the nextTokenIdToMint function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## openPack Prepares a transaction to call the "openPack" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { openPack } from "thirdweb/extensions/erc1155"; const transaction = openPack({ contract, packId: ..., amountToOpen: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function openPack( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams) | { asyncParams: () => Promise<[OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "openPack" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams) | { asyncParams: () => Promise<[OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## packCreatedEvent Creates an event object for the PackCreated event. ### Example `import { getContractEvents } from "thirdweb"; import { packCreatedEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ packCreatedEvent({ packId: ..., }) ], }); ` ##### Signature `function packCreatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackCreated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackCreated"; readonly type: "event"; }>; ` The prepared event object. ## packUpdatedEvent Creates an event object for the PackUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { packUpdatedEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ packUpdatedEvent({ packId: ..., }) ], }); ` ##### Signature `function packUpdatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackUpdated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackUpdated"; readonly type: "event"; }>; ` The prepared event object. ## packOpenedEvent Creates an event object for the PackOpened event. ### Example `import { getContractEvents } from "thirdweb"; import { packOpenedEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ packOpenedEvent({ packId: ..., opener: ..., }) ], }); ` ##### Signature `function packOpenedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "opener"; readonly type: "address"; }, { readonly name: "numOfPacksOpened"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "totalAmount"; readonly type: "uint256" }, ]; readonly name: "rewardUnitsDistributed"; readonly type: "tuple[]"; }, ]; readonly name: "PackOpened"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "opener"; readonly type: "address"; }, { readonly name: "numOfPacksOpened"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "totalAmount"; readonly type: "uint256" }, ]; readonly name: "rewardUnitsDistributed"; readonly type: "tuple[]"; }, ]; readonly name: "PackOpened"; readonly type: "event"; }>; ` The prepared event object. ## resetClaimEligibility Reset the claim eligibility for all users. ### Example `import { resetClaimEligibility } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = resetClaimEligibility({ contract, }); await sendTransaction({ transaction, account }); ` ##### Signature `function resetClaimEligibility( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionsParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionsParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## safeTransferFrom Prepares a transaction to call the "safeTransferFrom" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; const transaction = safeTransferFrom({ contract, from: ..., to: ..., tokenId: ..., value: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function safeTransferFrom( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SafeTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeTransferFromParams) | { asyncParams: () => Promise<[SafeTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeTransferFromParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "safeTransferFrom" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SafeTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeTransferFromParams) | { asyncParams: () => Promise<[SafeTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeTransferFromParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## safeBatchTransferFrom Prepares a transaction to call the "safeBatchTransferFrom" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { safeBatchTransferFrom } from "thirdweb/extensions/erc1155"; const transaction = safeBatchTransferFrom({ contract, from: ..., to: ..., tokenIds: ..., values: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function safeBatchTransferFrom( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SafeBatchTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeBatchTransferFromParams) | { asyncParams: () => Promise<[SafeBatchTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeBatchTransferFromParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "safeBatchTransferFrom" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SafeBatchTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeBatchTransferFromParams) | { asyncParams: () => Promise<[SafeBatchTransferFromParams](https://portal.thirdweb.com/references/typescript/v5/SafeBatchTransferFromParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setClaimConditions Set the claim conditions for a ERC1155 drop ### Example `import { setClaimConditions } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = setClaimConditions({ contract, tokenId: 0n, phases: [ { maxClaimableSupply: 100n, maxClaimablePerWallet: 1n, currencyAddress: "0x...", price: 0.1, startTime: new Date(), }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## setTokenURI Prepares a transaction to call the "setTokenURI" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setTokenURI } from "thirdweb/extensions/erc1155"; const transaction = setTokenURI({ contract, tokenId: ..., uri: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTokenURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams) | { asyncParams: () => Promise<[SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTokenURI" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams) | { asyncParams: () => Promise<[SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## tokensClaimedEvent Creates an event object for the TokensClaimed event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensClaimedEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ tokensClaimedEvent({ claimConditionIndex: ..., claimer: ..., receiver: ..., }) ], }); ` ##### Signature `function tokensClaimedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` The prepared event object. ## tokensLazyMintedEvent Creates an event object for the TokensLazyMinted event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensLazyMintedEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ tokensLazyMintedEvent({ startTokenId: ..., }) ], }); ` ##### Signature `function tokensLazyMintedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "startTokenId"; readonly type: "uint256"; }, { readonly name: "endTokenId"; readonly type: "uint256" }, { readonly name: "baseURI"; readonly type: "string" }, { readonly name: "encryptedBaseURI"; readonly type: "bytes" }, ]; readonly name: "TokensLazyMinted"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "startTokenId"; readonly type: "uint256"; }, { readonly name: "endTokenId"; readonly type: "uint256" }, { readonly name: "baseURI"; readonly type: "string" }, { readonly name: "encryptedBaseURI"; readonly type: "bytes" }, ]; readonly name: "TokensLazyMinted"; readonly type: "event"; }>; ` The prepared event object. ## setApprovalForAll Prepares a transaction to call the "setApprovalForAll" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setApprovalForAll } from "thirdweb/extensions/erc1155"; const transaction = setApprovalForAll({ contract, operator: ..., approved: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setApprovalForAll( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams) | { asyncParams: () => Promise<[SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setApprovalForAll" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams) | { asyncParams: () => Promise<[SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## tokensMintedWithSignatureEvent Creates an event object for the TokensMintedWithSignature event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensMintedWithSignatureEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ tokensMintedWithSignatureEvent({ signer: ..., mintedTo: ..., tokenIdMinted: ..., }) ], }); ` ##### Signature `function tokensMintedWithSignatureEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenIdMinted"; readonly type: "uint256"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "royaltyRecipient"; readonly type: "address"; }, { readonly name: "royaltyBps"; readonly type: "uint256" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "uri"; readonly type: "string" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintRequest"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenIdMinted"; readonly type: "uint256"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "royaltyRecipient"; readonly type: "address"; }, { readonly name: "royaltyBps"; readonly type: "uint256" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "uri"; readonly type: "string" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintRequest"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` The prepared event object. ## transferBatchEvent Creates an event object for the TransferBatch event. ### Example `import { getContractEvents } from "thirdweb"; import { transferBatchEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ transferBatchEvent({ _operator: ..., _from: ..., _to: ..., }) ], }); ` ##### Signature `function transferBatchEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_to"; readonly type: "address"; }, { readonly name: "tokenIds"; readonly type: "uint256[]" }, { readonly name: "_values"; readonly type: "uint256[]" }, ]; readonly name: "TransferBatch"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_to"; readonly type: "address"; }, { readonly name: "tokenIds"; readonly type: "uint256[]" }, { readonly name: "_values"; readonly type: "uint256[]" }, ]; readonly name: "TransferBatch"; readonly type: "event"; }>; ` The prepared event object. ## transferSingleEvent Creates an event object for the TransferSingle event. ### Example `import { getContractEvents } from "thirdweb"; import { transferSingleEvent } from "thirdweb/extensions/erc1155"; const events = await getContractEvents({ contract, events: [ transferSingleEvent({ _operator: ..., _from: ..., _to: ..., }) ], }); ` ##### Signature `function transferSingleEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_to"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "_value"; readonly type: "uint256" }, ]; readonly name: "TransferSingle"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "_operator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "_to"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "_value"; readonly type: "uint256" }, ]; readonly name: "TransferSingle"; readonly type: "event"; }>; ` The prepared event object. ## totalSupply Calls the "totalSupply" function on the contract. ### Example `import { totalSupply } from "thirdweb/extensions/erc1155"; const result = await totalSupply({ contract, id: ..., }); ` ##### Signature `function totalSupply( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TotalSupplyParams](https://portal.thirdweb.com/references/typescript/v5/TotalSupplyParams)>, ): Promise; ` ### Parameters ##### options The options for the totalSupply function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TotalSupplyParams](https://portal.thirdweb.com/references/typescript/v5/TotalSupplyParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## updateTokenURI This function is an abstracted layer of the [setTokenURI extension](https://portal.thirdweb.com/references/typescript/v5/erc1155/setTokenURI) , which means it uses `setTokenURI` under the hood. While the `setTokenURI` method only takes in a uri string, this extension takes in a user-friendly [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) , upload that content to IPFS and pass the IPFS URI (of said `NFTInput` ) to the underlying `setTokenURI` method. This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update. ### Example `import { updateTokenURI } from "thirdweb/extensions/erc1155"; const transaction = updateTokenURI({ tokenId: 0n, nft: { name: "new name", description: "new description", image: "https://image-host.com/new-image.png", }, }); ` ##### Signature `function updateTokenURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/UpdateTokenURIParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/UpdateTokenURIParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction from `setTokenURI` ## updateMetadata Update the metadata of the single token in an Edition Drop (DropERC1155) collection For Edition contracts, use `setTokenURI` ### Example `import { updateMetadata } from "thirdweb/extensions/erc1155"; import { sendTransaction } from "thirdweb"; const transaction = updateMetadata({ contract, targetTokenId: 0n, client: thirdwebClient, newMetadata: { name: "this is the new nft name", description: "...", image: "new image uri", // ... }, }); await sendTransaction({ transaction, account }); ` ##### Signature `function updateMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UpdateMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UpdateMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## uri Calls the "uri" function on the contract. ### Example `import { uri } from "thirdweb/extensions/erc1155"; const result = await uri({ contract, tokenId: ..., }); ` ##### Signature `function uri( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UriParams](https://portal.thirdweb.com/references/typescript/v5/UriParams)>, ): Promise; ` ### Parameters ##### options The options for the uri function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UriParams](https://portal.thirdweb.com/references/typescript/v5/UriParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## allowance Calls the "allowance" function on the contract. ### Example `import { allowance } from "thirdweb/extensions/erc20"; const result = await allowance({ contract, owner: ..., spender: ..., }); ` ##### Signature `function allowance( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AllowanceParams](https://portal.thirdweb.com/references/typescript/v5/AllowanceParams)>, ): Promise; ` ### Parameters ##### options The options for the allowance function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AllowanceParams](https://portal.thirdweb.com/references/typescript/v5/AllowanceParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## checkContractWalletSignedTypedData Deprecated Use `verifyTypedData` instead Checks if a contract wallet signature is valid. ### Example `import { checkContractWalletSignedTypedData } from "thirdweb/extensions/erc1271"; const isValid = await checkContractWalletSignedTypedData({ contract: myContract, data: { primaryType: "EIP712Domain", domain: { name: "Example", version: "1", chainId: 1, verifyingContract: myContract.address, }, }); ` ##### Signature `function checkContractWalletSignedTypedData( options: [CheckContractWalletSignTypedDataOptions](https://portal.thirdweb.com/references/typescript/v5/CheckContractWalletSignTypedDataOptions)< typedData, primaryType >, ): Promise; ` ### Parameters ##### options The options for the checkContractWalletSignature function. #### Type `let options: [CheckContractWalletSignTypedDataOptions](https://portal.thirdweb.com/references/typescript/v5/CheckContractWalletSignTypedDataOptions)< typedData, primaryType >; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves with a boolean indicating if the signature is valid. ## approvalEvent Creates an event object for the Approval event. ### Example `import { getContractEvents } from "thirdweb"; import { approvalEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [ approvalEvent({ owner: ..., spender: ..., }) ], }); ` ##### Signature `function approvalEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "spender"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Approval"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "spender"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Approval"; readonly type: "event"; }>; ` The prepared event object. ## burnFrom Prepares a transaction to call the "burnFrom" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { burnFrom } from "thirdweb/extensions/erc20"; const transaction = burnFrom({ contract, account: ..., amount: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function burnFrom( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnFromParams](https://portal.thirdweb.com/references/typescript/v5/BurnFromParams) | { asyncParams: () => Promise<[BurnFromParams](https://portal.thirdweb.com/references/typescript/v5/BurnFromParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "burnFrom" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnFromParams](https://portal.thirdweb.com/references/typescript/v5/BurnFromParams) | { asyncParams: () => Promise<[BurnFromParams](https://portal.thirdweb.com/references/typescript/v5/BurnFromParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## checkContractWalletSignature Deprecated Use `verifySignature` instead Checks if a contract wallet signature is valid. ### Example `import { checkContractWalletSignature } from "thirdweb/extensions/erc1271"; const isValid = await checkContractWalletSignature({ contract: myContract, message: "hello world", signature: "0x...", }); ` ##### Signature `function checkContractWalletSignature( options: [CheckContractWalletSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/CheckContractWalletSignatureOptions), ): Promise; ` ### Parameters ##### options The options for the checkContractWalletSignature function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); message: SignableMessage; signature: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves with a boolean indicating if the signature is valid. ## approve Approves the spending of tokens by a specific address. ### Example `import { approve } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = await approve({ contract, spender: "0x...", amount: 100, }); await sendTransaction({ transaction, account }); ` ##### Signature `function approve( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## canClaim Check if a user can claim a drop. ### Example `const claimResult = await canClaim({ contract: contract, claimer: "0x1234567890123456789012345678901234567890", quantity: "1", }); ` ##### Signature `function canClaim( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>, ): Promise<[CanClaimResult](https://portal.thirdweb.com/references/typescript/v5/CanClaimResult)>; ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>; ` ### Returns ##### Return Type `let returnType: { reason?: string; result: boolean }; ` Whether the user can claim the drop. ## burn Prepares a transaction to call the "burn" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { burn } from "thirdweb/extensions/erc20"; const transaction = burn({ contract, amount: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function burn( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "burn" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## balanceOf Calls the "balanceOf" function on the contract. ### Example `import { balanceOf } from "thirdweb/extensions/erc20"; const result = await balanceOf({ contract, address: ..., }); ` ##### Signature `function balanceOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>, ): Promise; ` ### Parameters ##### options The options for the balanceOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## decimals Retrieves the number of decimal places for a given ERC20 contract. ### Example `import { decimals } from "thirdweb/extensions/erc20"; const tokenDecimals = await decimals({ contract }); ` ##### Signature `function decimals(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the transaction. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the number of decimal places. ## claimConditionsUpdatedEvent Creates an event object for the ClaimConditionsUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { claimConditionsUpdatedEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [claimConditionsUpdatedEvent()], }); ` ##### Signature `function claimConditionsUpdatedEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly components: readonly [ { readonly name: "startTimestamp"; readonly type: "uint256" }, { readonly name: "maxClaimableSupply"; readonly type: "uint256"; }, { readonly name: "supplyClaimed"; readonly type: "uint256" }, { readonly name: "quantityLimitPerWallet"; readonly type: "uint256"; }, { readonly name: "merkleRoot"; readonly type: "bytes32" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "metadata"; readonly type: "string" }, ]; readonly name: "claimConditions"; readonly type: "tuple[]"; }, { readonly name: "resetEligibility"; readonly type: "bool" }, ]; readonly name: "ClaimConditionsUpdated"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly components: readonly [ { readonly name: "startTimestamp"; readonly type: "uint256" }, { readonly name: "maxClaimableSupply"; readonly type: "uint256"; }, { readonly name: "supplyClaimed"; readonly type: "uint256" }, { readonly name: "quantityLimitPerWallet"; readonly type: "uint256"; }, { readonly name: "merkleRoot"; readonly type: "bytes32" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "metadata"; readonly type: "string" }, ]; readonly name: "claimConditions"; readonly type: "tuple[]"; }, { readonly name: "resetEligibility"; readonly type: "bool" }, ]; readonly name: "ClaimConditionsUpdated"; readonly type: "event"; }>; ` The prepared event object. ## delegates Calls the "delegates" function on the contract. ### Example `import { delegates } from "thirdweb/extensions/erc20"; const result = await delegates({ contract, account: ..., }); ` ##### Signature `function delegates( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[DelegatesParams](https://portal.thirdweb.com/references/typescript/v5/DelegatesParams)>, ): Promise; ` ### Parameters ##### options The options for the delegates function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[DelegatesParams](https://portal.thirdweb.com/references/typescript/v5/DelegatesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## claimTo Claim ERC20 NFTs to a specified address ### Example #### Basic usage `import { claimTo } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = claimTo({ contract, to: "0x...", quantity: 100n, }); await sendTransaction({ transaction, account }); ` #### For Drops with allowlists You need to specify the claimer address as the `from` param to avoid any issue with the allowlist `const transaction = claimTo({ contract, to: "0x...", quantity: 100n, from: "0x...", // address of the one claiming }); ` ##### Signature `function claimTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves with the submitted transaction hash. ## delegate Prepares a transaction to call the "delegate" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { delegate } from "thirdweb/extensions/erc20"; const transaction = delegate({ contract, delegatee: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function delegate( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [DelegateParams](https://portal.thirdweb.com/references/typescript/v5/DelegateParams) | { asyncParams: () => Promise<[DelegateParams](https://portal.thirdweb.com/references/typescript/v5/DelegateParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "delegate" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [DelegateParams](https://portal.thirdweb.com/references/typescript/v5/DelegateParams) | { asyncParams: () => Promise<[DelegateParams](https://portal.thirdweb.com/references/typescript/v5/DelegateParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## generateMintSignature Generates the payload and signature for minting an ERC20 token. ### Example `import { mintWithSignature, generateMintSignature, } from "thirdweb/extensions/erc20"; const { payload, signature } = await generateMintSignature({ account, contract, mintRequest: { to: "0x...", quantity: "10", }, }); const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise<{ payload: { currency: string; price: bigint; primarySaleRecipient: string; quantity: bigint; to: string; uid: `0x${string}`; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; }>; `` ### Parameters ##### options The options for the minting process. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ payload: { currency: string; price: bigint; primarySaleRecipient: string; quantity: bigint; to: string; uid: `0x${string}`; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; }>; `` A promise that resolves to the payload and signature. ## getActiveClaimCondition Retrieves the active claim condition. ### Example `import { getActiveClaimCondition } from "thirdweb/extensions/erc20"; const activeClaimCondition = await getActiveClaimCondition({ contract, }); ` ##### Signature `function getActiveClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the active claim condition. ## getActiveClaimConditionId Calls the "getActiveClaimConditionId" function on the contract. ### Example `import { getActiveClaimConditionId } from "thirdweb/extensions/erc20"; const result = await getActiveClaimConditionId({ contract, }); ` ##### Signature `function getActiveClaimConditionId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getActiveClaimConditionId function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getClaimConditions Retrieves all claim conditions. ### Example `import { getClaimConditions } from "thirdweb/extensions/erc20"; const conditions = await getClaimConditions({ contract }); ` ##### Signature `function getClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to all claim conditions. ## getClaimConditionById Calls the "getClaimConditionById" function on the contract. ### Example `import { getClaimConditionById } from "thirdweb/extensions/erc20"; const result = await getClaimConditionById({ contract, conditionId: ..., }); ` ##### Signature `` function getClaimConditionById( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>, ): Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` ### Parameters ##### options The options for the getClaimConditionById function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` The parsed result of the function call. ## getBalance Retrieves the balance of an ERC20 token for a specific address. ### Example `import { getBalance } from "thirdweb/extensions/erc20"; const balance = await getBalance({ contract, address: "0x..." }); ` ##### Signature `function getBalance( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetBalanceParams](https://portal.thirdweb.com/references/typescript/v5/GetBalanceParams)>, ): Promise<[GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult)>; ` ### Parameters ##### options The transaction options including the address. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetBalanceParams](https://portal.thirdweb.com/references/typescript/v5/GetBalanceParams)>; ` ### Returns ##### Return Type `let returnType: { decimals: number; displayValue: string; name: string; symbol: string; value: bigint; }; ` An object containing the balance value, display value, and symbol. ## getCurrencyMetadata Retrieves the metadata of a currency. ### Example `import { getCurrencyMetadata } from "thirdweb/extensions/erc20"; const currencyMetadata = await getCurrencyMetadata({ contract }); ` ##### Signature `function getCurrencyMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<[GetCurrencyMetadataResult](https://portal.thirdweb.com/references/typescript/v5/GetCurrencyMetadataResult)>; ` ### Parameters ##### options The options for the transaction. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: { decimals: number; name: string; symbol: string }; ` A promise that resolves to an object containing the currency metadata. ## deposit Calls the "deposit" function on the contract (useful to wrap ETH). ### Example `import { deposit } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = deposit({ contract, amount: "0.1" }); await sendTransaction({ transaction, account }); ` ##### Signature `function deposit( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "deposit" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## isClaimToSupported Checks if the `claimTo` method is supported by the given contract. ### Example `import { isClaimToSupported } from "thirdweb/extensions/erc20"; const supported = isClaimToSupported(["0x..."]); ` ##### Signature `function isClaimToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `claimTo` method is supported. ## isERC20 Check if a contract is an ERC20 token. ### Example `import { isERC20 } from "thirdweb/extensions/erc20"; import { resolveContractAbi } from "thirdweb/contract"; const abi = await resolveContractAbi(contract); const selectors = abi .filter((f) => f.type === "function") .map((f) => toFunctionSelector(f)); const result = await isERC20(selectors); ` ##### Signature `function isERC20(availableSelectors: Array): boolean; ` ### Parameters ##### availableSelectors #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating whether the contract is an ERC20 token. ## isGetActiveClaimConditionSupported Checks if the `getActiveClaimCondition` method is supported by the given contract. ### Example `import { isGetActiveClaimConditionSupported } from "thirdweb/extensions/erc20"; const supported = isGetActiveClaimConditionSupported(["0x..."]); ` ##### Signature `function isGetActiveClaimConditionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getActiveClaimCondition` method is supported. ## isGetClaimConditionByIdSupported Checks if the `getClaimConditionById` method is supported by the given contract. ### Example `import { isGetClaimConditionByIdSupported } from "thirdweb/extensions/erc20"; const supported = isGetClaimConditionByIdSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionByIdSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditionById` method is supported. ## isMintToSupported Checks if the `mintTo` method is supported by the given contract. ### Example `import { isMintToSupported } from "thirdweb/extensions/erc20"; const supported = isMintToSupported(["0x..."]); ` ##### Signature `function isMintToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `mintTo` method is supported. ## isResetClaimEligibilitySupported Checks if the `resetClaimEligibility` method is supported by the given contract. ### Example `import { isResetClaimEligibilitySupported } from "thirdweb/extensions/erc20"; const supported = isResetClaimEligibilitySupported(["0x..."]); ` ##### Signature `function isResetClaimEligibilitySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `resetClaimEligibility` method is supported. ## isGetActiveClaimConditionIdSupported Checks if the `getActiveClaimConditionId` method is supported by the given contract. ### Example `import { isGetActiveClaimConditionIdSupported } from "thirdweb/extensions/erc20"; const supported = isGetActiveClaimConditionIdSupported(["0x..."]); ` ##### Signature `function isGetActiveClaimConditionIdSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getActiveClaimConditionId` method is supported. ## mintTo Mints a specified amount of tokens to a given address. ### Example `import { mintTo } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = mintTo({ contract, to: "0x...", amount: 100, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## resetClaimEligibility Reset the claim eligibility for all users. ### Example `import { resetClaimEligibility } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = resetClaimEligibility({ contract, }); await sendTransaction({ transaction, account }); ` ##### Signature `function resetClaimEligibility( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## isSetClaimConditionsSupported Checks if the `setClaimConditions` method is supported by the given contract. ### Example `import { isSetClaimConditionsSupported } from "thirdweb/extensions/erc20"; const supported = isSetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isSetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setClaimConditions` method is supported. ## mintWithSignature Mints a new ERC20 token with the given minter signature ### Example `import { mintWithSignature, generateMintSignature } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const { payload, signature } = await generateMintSignature(...) const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## tokensClaimedEvent Creates an event object for the TokensClaimed event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensClaimedEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [ tokensClaimedEvent({ claimConditionIndex: ..., claimer: ..., receiver: ..., }) ], }); ` ##### Signature `function tokensClaimedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` The prepared event object. ## setClaimConditions Set the claim conditions for a ERC20 drop ### Example `import { setClaimConditions } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = setClaimConditions({ contract, phases: [ { maxClaimableSupply: 100n, maxClaimablePerWallet: 1n, currencyAddress: "0x...", price: 0.1, startTime: new Date(), }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## tokensMintedWithSignatureEvent Creates an event object for the TokensMintedWithSignature event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensMintedWithSignatureEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [ tokensMintedWithSignatureEvent({ signer: ..., mintedTo: ..., }) ], }); ` ##### Signature `function tokensMintedWithSignatureEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "price"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintRequest"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "price"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintRequest"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` The prepared event object. ## transfer Transfers ERC20 tokens from the sender's address to the specified recipient address. ### Example `import { transfer } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = transfer({ contract, to: "0x...", amount: 100, }); await sendTransaction({ transaction, account }); ` ##### Signature `function transfer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transfer transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared transaction. ## transferBatch Transfers a batch of ERC20 tokens from the sender's address to the specified recipient address. ### Example `import { transferBatch } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = transferBatch({ contract, batch: [ { to: "0x...", amount: 100, }, { to: "0x...", amount: "0.1", }, ]); await sendTransaction({ transaction, account }); ` ##### Signature `function transferBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ batch: Array< { to: string } & ( | { amount: string | number } | { amountWei: bigint } ) >; }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the batch transfer transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ batch: Array< { to: string } & ( | { amount: string | number } | { amountWei: bigint } ) >; }>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared transaction. ## tokensMintedEvent Creates an event object for the TokensMinted event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensMintedEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [ tokensMintedEvent({ mintedTo: ..., }) ], }); ` ##### Signature `function tokensMintedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly name: "quantityMinted"; readonly type: "uint256" }, ]; readonly name: "TokensMinted"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly name: "quantityMinted"; readonly type: "uint256" }, ]; readonly name: "TokensMinted"; readonly type: "event"; }>; ` The prepared event object. ## transferEvent Creates an event object for the Transfer event. ### Example `import { getContractEvents } from "thirdweb"; import { transferEvent } from "thirdweb/extensions/erc20"; const events = await getContractEvents({ contract, events: [ transferEvent({ from: ..., to: ..., }) ], }); ` ##### Signature `function transferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "value"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` The prepared event object. ## transferFrom Transfers a specified amount of tokens from one address to another address on the ERC20 contract. ### Example `import { transferFrom } from "thirdweb/extensions/erc20"; import { sendTransaction } from "thirdweb"; const transaction = transferFrom({ contract: USDC_CONTRACT, from: "0x1234...", to: "0x5678...", amount: 100, }); await sendTransaction({ transaction, account }); ` ##### Signature `function transferFrom( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options including from, to, amount, and gas price. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared transaction object. ## accountDeployedEvent Creates an event object for the AccountDeployed event. ### Example `import { getContractEvents } from "thirdweb"; import { accountDeployedEvent } from "thirdweb/extensions/erc4337"; const events = await getContractEvents({ contract, events: [ accountDeployedEvent({ userOpHash: ..., sender: ..., }) ], }); ` ##### Signature `function accountDeployedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly name: "factory"; readonly type: "address" }, { readonly name: "paymaster"; readonly type: "address" }, ]; readonly name: "AccountDeployed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly name: "factory"; readonly type: "address" }, { readonly name: "paymaster"; readonly type: "address" }, ]; readonly name: "AccountDeployed"; readonly type: "event"; }>; ` The prepared event object. ## withdraw Prepares a transaction to call the "withdraw" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { withdraw } from "thirdweb/extensions/erc20"; const transaction = withdraw({ contract, amount: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function withdraw( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams) | { asyncParams: () => Promise<[WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "withdraw" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams) | { asyncParams: () => Promise<[WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## addSessionKey Adds session key permissions for a specified address. ### Example `import { addSessionKey } from "thirdweb/extensions/erc4337"; import { sendTransaction } from "thirdweb"; const transaction = addSessionKey({ contract, account, sessionKeyAddress, permissions: { approvedTargets: ["0x..."], nativeTokenLimitPerTransaction: 0.1, // in ETH permissionStartTimestamp: new Date(), permissionEndTimestamp: new Date( Date.now() + 1000 * 60 * 60 * 24 * 365, ), // 1 year from now }, }); await sendTransaction({ transaction, account }); ` ##### Signature `function addSessionKey( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AddSessionKeyOptions](https://portal.thirdweb.com/references/typescript/v5/AddSessionKeyOptions)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the removeSessionKey function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AddSessionKeyOptions](https://portal.thirdweb.com/references/typescript/v5/AddSessionKeyOptions)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction object to be sent. ## addAdmin Adds admin permissions for a specified address. ### Example `import { addAdmin } from "thirdweb/extensions/erc4337"; import { sendTransaction } from "thirdweb"; const transaction = addAdmin({ contract, account, adminAddress: "0x...", }); await sendTransaction({ transaction, account }); ` ##### Signature `function addAdmin( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AddAdminOptions](https://portal.thirdweb.com/references/typescript/v5/AddAdminOptions)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the addAdmin function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AddAdminOptions](https://portal.thirdweb.com/references/typescript/v5/AddAdminOptions)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction object to be sent. ## adminUpdatedEvent Creates an event object for the AdminUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { adminUpdatedEvent } from "thirdweb/extensions/erc4337"; const events = await getContractEvents({ contract, events: [ adminUpdatedEvent({ signer: ..., }) ], }); ` ##### Signature `function adminUpdatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly name: "isAdmin"; readonly type: "bool" }, ]; readonly name: "AdminUpdated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly name: "isAdmin"; readonly type: "bool" }, ]; readonly name: "AdminUpdated"; readonly type: "event"; }>; ` The prepared event object. ## getAccounts Calls the "getAccounts" function on the contract. ### Example `import { getAccounts } from "thirdweb/extensions/erc4337"; const result = await getAccounts({ contract, start: ..., end: ..., }); ` ##### Signature `function getAccounts(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise> ` ### Parameters ##### options The options for the getAccounts function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## createAccount Prepares a transaction to call the "createAccount" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { createAccount } from "thirdweb/extensions/erc4337"; const transaction = createAccount({ contract, admin: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function createAccount( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CreateAccountParams](https://portal.thirdweb.com/references/typescript/v5/CreateAccountParams) | { asyncParams: () => Promise<[CreateAccountParams](https://portal.thirdweb.com/references/typescript/v5/CreateAccountParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "createAccount" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CreateAccountParams](https://portal.thirdweb.com/references/typescript/v5/CreateAccountParams) | { asyncParams: () => Promise<[CreateAccountParams](https://portal.thirdweb.com/references/typescript/v5/CreateAccountParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getAccountsOfSigner Calls the "getAccountsOfSigner" function on the contract. ### Example `import { getAccountsOfSigner } from "thirdweb/extensions/erc4337"; const result = await getAccountsOfSigner({ contract, signer: ..., }); ` ##### Signature `function getAccountsOfSigner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAccountsOfSignerParams](https://portal.thirdweb.com/references/typescript/v5/GetAccountsOfSignerParams)>) : Promise> ` ### Parameters ##### options The options for the getAccountsOfSigner function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAccountsOfSignerParams](https://portal.thirdweb.com/references/typescript/v5/GetAccountsOfSignerParams)>; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## getAllAccounts Calls the "getAllAccounts" function on the contract. ### Example `import { getAllAccounts } from "thirdweb/extensions/erc4337"; const result = await getAllAccounts({ contract, }); ` ##### Signature `function getAllAccounts(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise> ` ### Parameters ##### options The options for the getAllAccounts function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## getAllActiveSigners Calls the "getAllActiveSigners" function on the contract. ### Example `import { getAllActiveSigners } from "thirdweb/extensions/erc4337"; const result = await getAllActiveSigners({ contract, }); ` ##### Signature `function getAllActiveSigners(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>> ` ### Parameters ##### options The options for the getAllActiveSigners function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>> ` The parsed result of the function call. ## getAllSigners Calls the "getAllSigners" function on the contract. ### Example `import { getAllSigners } from "thirdweb/extensions/erc4337"; const result = await getAllSigners({ contract, }); ` ##### Signature `function getAllSigners(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>> ` ### Parameters ##### options The options for the getAllSigners function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>> ` The parsed result of the function call. ## getAllAdmins Calls the "getAllAdmins" function on the contract. ### Example `import { getAllAdmins } from "thirdweb/extensions/erc4337"; const result = await getAllAdmins({ contract, }); ` ##### Signature `function getAllAdmins(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise> ` ### Parameters ##### options The options for the getAllAdmins function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## getPermissionsForSigner Calls the "getPermissionsForSigner" function on the contract. ### Example `import { getPermissionsForSigner } from "thirdweb/extensions/erc4337"; const result = await getPermissionsForSigner({ contract, signer: ..., }); ` ##### Signature `function getPermissionsForSigner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPermissionsForSignerParams](https://portal.thirdweb.com/references/typescript/v5/GetPermissionsForSignerParams)>) : Promise<{ approvedTargets: readonly Array; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }> ` ### Parameters ##### options The options for the getPermissionsForSigner function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPermissionsForSignerParams](https://portal.thirdweb.com/references/typescript/v5/GetPermissionsForSignerParams)>; ` ### Returns ##### Return Type `let returnType: Promise<{ approvedTargets: readonly Array; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }> ` The parsed result of the function call. ## getUserOpHash Calls the "getUserOpHash" function on the contract. ### Example `import { getUserOpHash } from "thirdweb/extensions/erc4337"; const result = await getUserOpHash({ contract, userOp: ..., }); ` ##### Signature `` function getUserOpHash( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetUserOpHashParams](https://portal.thirdweb.com/references/typescript/v5/GetUserOpHashParams)>, ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the getUserOpHash function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetUserOpHashParams](https://portal.thirdweb.com/references/typescript/v5/GetUserOpHashParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## isActiveSigner Calls the "isActiveSigner" function on the contract. ### Example `import { isActiveSigner } from "thirdweb/extensions/erc4337"; const result = await isActiveSigner({ contract, signer: ..., }); ` ##### Signature `function isActiveSigner( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsActiveSignerParams](https://portal.thirdweb.com/references/typescript/v5/IsActiveSignerParams)>, ): Promise; ` ### Parameters ##### options The options for the isActiveSigner function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsActiveSignerParams](https://portal.thirdweb.com/references/typescript/v5/IsActiveSignerParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## totalSupply Calls the "totalSupply" function on the contract. ### Example `import { totalSupply } from "thirdweb/extensions/erc20"; const result = await totalSupply({ contract, }); ` ##### Signature `function totalSupply( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalSupply function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isAccountDeployed Adds admin permissions for a specified address. ### Example `import { isAccountDeployed } from "thirdweb/extensions/erc4337"; const isDeployed = await isAccountDeployed({ contract, account, adminSigner: "0x...", }); await isAccountDeployed({ contract, adminSigner }); ` ##### Signature `function isAccountDeployed( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the addAdmin function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The transaction object to be sent. ## isAddSessionKeySupported Checks if the `isAddSessionKeySupported` method is supported by the given contract. ### Example `import { isAddSessionKeySupported } from "thirdweb/extensions/erc4337"; const supported = isAddSessionKeySupported(["0x..."]); ` ##### Signature `function isAddSessionKeySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isAddSessionKeySupported` method is supported. ## isAddAdminSupported Checks if the `isAddAdminSupported` method is supported by the given contract. ### Example `import { isAddAdminSupported } from "thirdweb/extensions/erc4337"; const supported = isAddAdminSupported(["0x..."]); ` ##### Signature `function isAddAdminSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isAddAdminSupported` method is supported. ## isCreateAccountSupported Checks if the `createAccount` method is supported by the given contract. ### Example `import { isCreateAccountSupported } from "thirdweb/extensions/erc4337"; const supported = isCreateAccountSupported(["0x..."]); ` ##### Signature `function isCreateAccountSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `createAccount` method is supported. ## isAdmin Calls the "isAdmin" function on the contract. ### Example `import { isAdmin } from "thirdweb/extensions/erc4337"; const result = await isAdmin({ contract, signer: ..., }); ` ##### Signature `function isAdmin( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the isAdmin function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isGetAccountsOfSignerSupported Checks if the `getAccountsOfSigner` method is supported by the given contract. ### Example `import { isGetAccountsOfSignerSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAccountsOfSignerSupported(["0x..."]); ` ##### Signature `function isGetAccountsOfSignerSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAccountsOfSigner` method is supported. ## isGetAccountsSupported Checks if the `getAccounts` method is supported by the given contract. ### Example `import { isGetAccountsSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAccountsSupported(["0x..."]); ` ##### Signature `function isGetAccountsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAccounts` method is supported. ## isGetAllActiveSignersSupported Checks if the `getAllActiveSigners` method is supported by the given contract. ### Example `import { isGetAllActiveSignersSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAllActiveSignersSupported(["0x..."]); ` ##### Signature `function isGetAllActiveSignersSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAllActiveSigners` method is supported. ## isGetAllAccountsSupported Checks if the `getAllAccounts` method is supported by the given contract. ### Example `import { isGetAllAccountsSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAllAccountsSupported(["0x..."]); ` ##### Signature `function isGetAllAccountsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAllAccounts` method is supported. ## isGetAllSignersSupported Checks if the `getAllSigners` method is supported by the given contract. ### Example `import { isGetAllSignersSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAllSignersSupported(["0x..."]); ` ##### Signature `function isGetAllSignersSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAllSigners` method is supported. ## isGetAllAdminsSupported Checks if the `getAllAdmins` method is supported by the given contract. ### Example `import { isGetAllAdminsSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAllAdminsSupported(["0x..."]); ` ##### Signature `function isGetAllAdminsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAllAdmins` method is supported. ## isIsAccountDeployedSupported Checks if the `getAddress` method is supported by the given contract. ### Example `import { isGetAddressSupported } from "thirdweb/extensions/erc4337"; const supported = isGetAddressSupported(["0x..."]); ` ##### Signature `function isIsAccountDeployedSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAddress` method is supported. ## isIsAdminSupported Checks if the `isAdmin` method is supported by the given contract. ### Example `import { isIsAdminSupported } from "thirdweb/extensions/erc4337"; const supported = isIsAdminSupported(["0x..."]); ` ##### Signature `function isIsAdminSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isAdmin` method is supported. ## isIsActiveSignerSupported Checks if the `isActiveSigner` method is supported by the given contract. ### Example `import { isIsActiveSignerSupported } from "thirdweb/extensions/erc4337"; const supported = isIsActiveSignerSupported(["0x..."]); ` ##### Signature `function isIsActiveSignerSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isActiveSigner` method is supported. ## isRegistered Calls the "isRegistered" function on the contract. ### Example `import { isRegistered } from "thirdweb/extensions/erc4337"; const result = await isRegistered({ contract, account: ..., }); ` ##### Signature `function isRegistered( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the isRegistered function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isRemoveAdminSupported Checks if the `isRemoveAdminSupported` method is supported by the given contract. ### Example `import { isRemoveAdminSupported } from "thirdweb/extensions/erc4337"; const supported = isRemoveAdminSupported(["0x..."]); ` ##### Signature `function isRemoveAdminSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isRemoveAdminSupported` method is supported. ## isRemoveSessionKeySupported Checks if the `isRemoveSessionKeySupported` method is supported by the given contract. ### Example `import { isRemoveSessionKeySupported } from "thirdweb/extensions/erc4337"; const supported = isRemoveSessionKeySupported(["0x..."]); ` ##### Signature `function isRemoveSessionKeySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isRemoveSessionKeySupported` method is supported. ## isValidateUserOpSupported Checks if the `validateUserOp` method is supported by the given contract. ### Example `import { isValidateUserOpSupported } from "thirdweb/extensions/erc4337"; const supported = isValidateUserOpSupported(["0x..."]); ` ##### Signature `function isValidateUserOpSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `validateUserOp` method is supported. ## isTotalAccountsSupported Checks if the `totalAccounts` method is supported by the given contract. ### Example `import { isTotalAccountsSupported } from "thirdweb/extensions/erc4337"; const supported = isTotalAccountsSupported(["0x..."]); ` ##### Signature `function isTotalAccountsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `totalAccounts` method is supported. ## removeAdmin Removes admin permissions for a specified address. ### Example `import { removeAdmin } from "thirdweb/extensions/erc4337"; import { sendTransaction } from "thirdweb"; const transaction = removeAdmin({ contract, account, adminAddress: "0x...", }); await sendTransaction({ transaction, account }); ` ##### Signature `function removeAdmin( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RemoveAdminOptions](https://portal.thirdweb.com/references/typescript/v5/RemoveAdminOptions)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the removeAdmin function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RemoveAdminOptions](https://portal.thirdweb.com/references/typescript/v5/RemoveAdminOptions)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction object to be sent. ## predictAccountAddress Calls the "getAddress" function on the contract. ### Example `import { getAddress } from "thirdweb/extensions/erc4337"; const result = await getAddress({ contract, adminSigner: ..., data: ..., }); ` ##### Signature `function predictAccountAddress( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getAddress function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## removeSessionKey Removes session key permissions for a specified address. ### Example `import { removeSessionKey } from "thirdweb/extensions/erc4337"; import { sendTransaction } from "thirdweb"; const transaction = removeSessionKey({ contract, account, sessionKeyAddress, }); await sendTransaction({ transaction, account }); ` ##### Signature `function removeSessionKey( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RemoveSessionKeyOptions](https://portal.thirdweb.com/references/typescript/v5/RemoveSessionKeyOptions)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the removeSessionKey function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RemoveSessionKeyOptions](https://portal.thirdweb.com/references/typescript/v5/RemoveSessionKeyOptions)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction object to be sent. ## signerPermissionsUpdatedEvent Creates an event object for the SignerPermissionsUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { signerPermissionsUpdatedEvent } from "thirdweb/extensions/erc4337"; const events = await getContractEvents({ contract, events: [ signerPermissionsUpdatedEvent({ authorizingSigner: ..., targetSigner: ..., }) ], }); ` ##### Signature `function signerPermissionsUpdatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "authorizingSigner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "targetSigner"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "signer"; readonly type: "address" }, { readonly name: "isAdmin"; readonly type: "uint8" }, { readonly name: "approvedTargets"; readonly type: "address[]"; }, { readonly name: "nativeTokenLimitPerTransaction"; readonly type: "uint256"; }, { readonly name: "permissionStartTimestamp"; readonly type: "uint128"; }, { readonly name: "permissionEndTimestamp"; readonly type: "uint128"; }, { readonly name: "reqValidityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "reqValidityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "permissions"; readonly type: "tuple"; }, ]; readonly name: "SignerPermissionsUpdated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "authorizingSigner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "targetSigner"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "signer"; readonly type: "address" }, { readonly name: "isAdmin"; readonly type: "uint8" }, { readonly name: "approvedTargets"; readonly type: "address[]"; }, { readonly name: "nativeTokenLimitPerTransaction"; readonly type: "uint256"; }, { readonly name: "permissionStartTimestamp"; readonly type: "uint128"; }, { readonly name: "permissionEndTimestamp"; readonly type: "uint128"; }, { readonly name: "reqValidityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "reqValidityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "permissions"; readonly type: "tuple"; }, ]; readonly name: "SignerPermissionsUpdated"; readonly type: "event"; }>; ` The prepared event object. ## simulateHandleOp Prepares a transaction to call the "simulateHandleOp" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { simulateHandleOp } from "thirdweb/extensions/erc4337"; const transaction = simulateHandleOp({ contract, op: ..., target: ..., targetCallData: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function simulateHandleOp( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SimulateHandleOpParams](https://portal.thirdweb.com/references/typescript/v5/SimulateHandleOpParams) | { asyncParams: () => Promise<[SimulateHandleOpParams](https://portal.thirdweb.com/references/typescript/v5/SimulateHandleOpParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "simulateHandleOp" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SimulateHandleOpParams](https://portal.thirdweb.com/references/typescript/v5/SimulateHandleOpParams) | { asyncParams: () => Promise<[SimulateHandleOpParams](https://portal.thirdweb.com/references/typescript/v5/SimulateHandleOpParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## totalAccounts Calls the "totalAccounts" function on the contract. ### Example `import { totalAccounts } from "thirdweb/extensions/erc4337"; const result = await totalAccounts({ contract, }); ` ##### Signature `function totalAccounts( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalAccounts function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## convertToAssets Calls the "convertToAssets" function on the contract. ### Example `import { convertToAssets } from "thirdweb/extensions/erc4626"; const result = await convertToAssets({ contract, shares: ..., }); ` ##### Signature `function convertToAssets( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ConvertToAssetsParams](https://portal.thirdweb.com/references/typescript/v5/ConvertToAssetsParams)>, ): Promise; ` ### Parameters ##### options The options for the convertToAssets function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ConvertToAssetsParams](https://portal.thirdweb.com/references/typescript/v5/ConvertToAssetsParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## asset Calls the "asset" function on the contract. ### Example `import { asset } from "thirdweb/extensions/erc4626"; const result = await asset({ contract, }); ` ##### Signature `function asset(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the asset function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## userOperationEventEvent Creates an event object for the UserOperationEvent event. ### Example `import { getContractEvents } from "thirdweb"; import { userOperationEventEvent } from "thirdweb/extensions/erc4337"; const events = await getContractEvents({ contract, events: [ userOperationEventEvent({ userOpHash: ..., sender: ..., paymaster: ..., }) ], }); ` ##### Signature `function userOperationEventEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly indexed: true; readonly name: "paymaster"; readonly type: "address"; }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "success"; readonly type: "bool" }, { readonly name: "actualGasCost"; readonly type: "uint256" }, { readonly name: "actualGasUsed"; readonly type: "uint256" }, ]; readonly name: "UserOperationEvent"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly indexed: true; readonly name: "paymaster"; readonly type: "address"; }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "success"; readonly type: "bool" }, { readonly name: "actualGasCost"; readonly type: "uint256" }, { readonly name: "actualGasUsed"; readonly type: "uint256" }, ]; readonly name: "UserOperationEvent"; readonly type: "event"; }>; ` The prepared event object. ## userOperationRevertReasonEvent Creates an event object for the UserOperationRevertReason event. ### Example `import { getContractEvents } from "thirdweb"; import { userOperationRevertReasonEvent } from "thirdweb/extensions/erc4337"; const events = await getContractEvents({ contract, events: [ userOperationRevertReasonEvent({ userOpHash: ..., sender: ..., }) ], }); ` ##### Signature `function userOperationRevertReasonEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "revertReason"; readonly type: "bytes" }, ]; readonly name: "UserOperationRevertReason"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "userOpHash"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "revertReason"; readonly type: "bytes" }, ]; readonly name: "UserOperationRevertReason"; readonly type: "event"; }>; ` The prepared event object. ## depositEvent Creates an event object for the Deposit event. ### Example `import { getContractEvents } from "thirdweb"; import { depositEvent } from "thirdweb/extensions/erc4626"; const events = await getContractEvents({ contract, events: [ depositEvent({ caller: ..., owner: ..., }) ], }); ` ##### Signature `function depositEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "caller"; readonly type: "address"; }, { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly name: "assets"; readonly type: "uint256" }, { readonly name: "shares"; readonly type: "uint256" }, ]; readonly name: "Deposit"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "caller"; readonly type: "address"; }, { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly name: "assets"; readonly type: "uint256" }, { readonly name: "shares"; readonly type: "uint256" }, ]; readonly name: "Deposit"; readonly type: "event"; }>; ` The prepared event object. ## deposit Prepares a transaction to call the "deposit" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { deposit } from "thirdweb/extensions/erc4626"; const transaction = deposit({ contract, assets: ..., receiver: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function deposit( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams) | { asyncParams: () => Promise<[DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "deposit" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams) | { asyncParams: () => Promise<[DepositParams](https://portal.thirdweb.com/references/typescript/v5/DepositParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## convertToShares Calls the "convertToShares" function on the contract. ### Example `import { convertToShares } from "thirdweb/extensions/erc4626"; const result = await convertToShares({ contract, assets: ..., }); ` ##### Signature `function convertToShares( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ConvertToSharesParams](https://portal.thirdweb.com/references/typescript/v5/ConvertToSharesParams)>, ): Promise; ` ### Parameters ##### options The options for the convertToShares function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ConvertToSharesParams](https://portal.thirdweb.com/references/typescript/v5/ConvertToSharesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxMint Calls the "maxMint" function on the contract. ### Example `import { maxMint } from "thirdweb/extensions/erc4626"; const result = await maxMint({ contract, receiver: ..., }); ` ##### Signature `function maxMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxMintParams](https://portal.thirdweb.com/references/typescript/v5/MaxMintParams)>, ): Promise; ` ### Parameters ##### options The options for the maxMint function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxMintParams](https://portal.thirdweb.com/references/typescript/v5/MaxMintParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxRedeem Calls the "maxRedeem" function on the contract. ### Example `import { maxRedeem } from "thirdweb/extensions/erc4626"; const result = await maxRedeem({ contract, owner: ..., }); ` ##### Signature `function maxRedeem( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxRedeemParams](https://portal.thirdweb.com/references/typescript/v5/MaxRedeemParams)>, ): Promise; ` ### Parameters ##### options The options for the maxRedeem function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxRedeemParams](https://portal.thirdweb.com/references/typescript/v5/MaxRedeemParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxWithdraw Calls the "maxWithdraw" function on the contract. ### Example `import { maxWithdraw } from "thirdweb/extensions/erc4626"; const result = await maxWithdraw({ contract, owner: ..., }); ` ##### Signature `function maxWithdraw( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxWithdrawParams](https://portal.thirdweb.com/references/typescript/v5/MaxWithdrawParams)>, ): Promise; ` ### Parameters ##### options The options for the maxWithdraw function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxWithdrawParams](https://portal.thirdweb.com/references/typescript/v5/MaxWithdrawParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## mint Prepares a transaction to call the "mint" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { mint } from "thirdweb/extensions/erc4626"; const transaction = mint({ contract, shares: ..., receiver: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams) | { asyncParams: () => Promise<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "mint" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams) | { asyncParams: () => Promise<[MintParams](https://portal.thirdweb.com/references/typescript/v5/MintParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## previewMint Calls the "previewMint" function on the contract. ### Example `import { previewMint } from "thirdweb/extensions/erc4626"; const result = await previewMint({ contract, shares: ..., }); ` ##### Signature `function previewMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewMintParams](https://portal.thirdweb.com/references/typescript/v5/PreviewMintParams)>, ): Promise; ` ### Parameters ##### options The options for the previewMint function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewMintParams](https://portal.thirdweb.com/references/typescript/v5/PreviewMintParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## previewRedeem Calls the "previewRedeem" function on the contract. ### Example `import { previewRedeem } from "thirdweb/extensions/erc4626"; const result = await previewRedeem({ contract, shares: ..., }); ` ##### Signature `function previewRedeem( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewRedeemParams](https://portal.thirdweb.com/references/typescript/v5/PreviewRedeemParams)>, ): Promise; ` ### Parameters ##### options The options for the previewRedeem function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewRedeemParams](https://portal.thirdweb.com/references/typescript/v5/PreviewRedeemParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## previewDeposit Calls the "previewDeposit" function on the contract. ### Example `import { previewDeposit } from "thirdweb/extensions/erc4626"; const result = await previewDeposit({ contract, assets: ..., }); ` ##### Signature `function previewDeposit( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewDepositParams](https://portal.thirdweb.com/references/typescript/v5/PreviewDepositParams)>, ): Promise; ` ### Parameters ##### options The options for the previewDeposit function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewDepositParams](https://portal.thirdweb.com/references/typescript/v5/PreviewDepositParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## previewWithdraw Calls the "previewWithdraw" function on the contract. ### Example `import { previewWithdraw } from "thirdweb/extensions/erc4626"; const result = await previewWithdraw({ contract, assets: ..., }); ` ##### Signature `function previewWithdraw( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewWithdrawParams](https://portal.thirdweb.com/references/typescript/v5/PreviewWithdrawParams)>, ): Promise; ` ### Parameters ##### options The options for the previewWithdraw function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PreviewWithdrawParams](https://portal.thirdweb.com/references/typescript/v5/PreviewWithdrawParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## redeem Prepares a transaction to call the "redeem" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { redeem } from "thirdweb/extensions/erc4626"; const transaction = redeem({ contract, shares: ..., receiver: ..., owner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function redeem( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RedeemParams](https://portal.thirdweb.com/references/typescript/v5/RedeemParams) | { asyncParams: () => Promise<[RedeemParams](https://portal.thirdweb.com/references/typescript/v5/RedeemParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "redeem" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RedeemParams](https://portal.thirdweb.com/references/typescript/v5/RedeemParams) | { asyncParams: () => Promise<[RedeemParams](https://portal.thirdweb.com/references/typescript/v5/RedeemParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## withdraw Prepares a transaction to call the "withdraw" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { withdraw } from "thirdweb/extensions/erc4626"; const transaction = withdraw({ contract, assets: ..., receiver: ..., owner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function withdraw( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams) | { asyncParams: () => Promise<[WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "withdraw" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams) | { asyncParams: () => Promise<[WithdrawParams](https://portal.thirdweb.com/references/typescript/v5/WithdrawParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## withdrawEvent Creates an event object for the Withdraw event. ### Example `import { getContractEvents } from "thirdweb"; import { withdrawEvent } from "thirdweb/extensions/erc4626"; const events = await getContractEvents({ contract, events: [ withdrawEvent({ caller: ..., receiver: ..., owner: ..., }) ], }); ` ##### Signature `function withdrawEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "caller"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly name: "assets"; readonly type: "uint256" }, { readonly name: "shares"; readonly type: "uint256" }, ]; readonly name: "Withdraw"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "caller"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly name: "assets"; readonly type: "uint256" }, { readonly name: "shares"; readonly type: "uint256" }, ]; readonly name: "Withdraw"; readonly type: "event"; }>; ` The prepared event object. ## approvalEvent Creates an event object for the Approval event. ### Example `import { getContractEvents } from "thirdweb"; import { approvalEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ approvalEvent({ owner: ..., approved: ..., tokenId: ..., }) ], }); ` ##### Signature `function approvalEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "approved"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }, ]; readonly name: "Approval"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "approved"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }, ]; readonly name: "Approval"; readonly type: "event"; }>; ` The prepared event object. ## totalAssets Calls the "totalAssets" function on the contract. ### Example `import { totalAssets } from "thirdweb/extensions/erc4626"; const result = await totalAssets({ contract, }); ` ##### Signature `function totalAssets( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalAssets function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxDeposit Calls the "maxDeposit" function on the contract. ### Example `import { maxDeposit } from "thirdweb/extensions/erc4626"; const result = await maxDeposit({ contract, receiver: ..., }); ` ##### Signature `function maxDeposit( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxDepositParams](https://portal.thirdweb.com/references/typescript/v5/MaxDepositParams)>, ): Promise; ` ### Parameters ##### options The options for the maxDeposit function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MaxDepositParams](https://portal.thirdweb.com/references/typescript/v5/MaxDepositParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## approve Prepares a transaction to call the "approve" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { approve } from "thirdweb/extensions/erc721"; const transaction = approve({ contract, to: ..., tokenId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function approve( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams) | { asyncParams: () => Promise<[ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "approve" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams) | { asyncParams: () => Promise<[ApproveParams](https://portal.thirdweb.com/references/typescript/v5/ApproveParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## balanceOf Calls the "balanceOf" function on the contract. ### Example `import { balanceOf } from "thirdweb/extensions/erc721"; const result = await balanceOf({ contract, owner: ..., }); ` ##### Signature `function balanceOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>, ): Promise; ` ### Parameters ##### options The options for the balanceOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## approvalForAllEvent Creates an event object for the ApprovalForAll event. ### Example `import { getContractEvents } from "thirdweb"; import { approvalForAllEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ approvalForAllEvent({ owner: ..., operator: ..., }) ], }); ` ##### Signature `function approvalForAllEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "operator"; readonly type: "address"; }, { readonly name: "approved"; readonly type: "bool" }, ]; readonly name: "ApprovalForAll"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "owner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "operator"; readonly type: "address"; }, { readonly name: "approved"; readonly type: "bool" }, ]; readonly name: "ApprovalForAll"; readonly type: "event"; }>; ` The prepared event object. ## canClaim Check if a user can claim a drop. ### Example `const claimResult = await canClaim({ contract: contract, claimer: "0x1234567890123456789012345678901234567890", quantity: "1", }); ` ##### Signature `function canClaim( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>, ): Promise<[CanClaimResult](https://portal.thirdweb.com/references/typescript/v5/CanClaimResult)>; ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CanClaimParams](https://portal.thirdweb.com/references/typescript/v5/CanClaimParams)>; ` ### Returns ##### Return Type `let returnType: { reason?: string; result: boolean }; ` Whether the user can claim the drop. ## claimConditionsUpdatedEvent Creates an event object for the ClaimConditionsUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { claimConditionsUpdatedEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [claimConditionsUpdatedEvent()], }); ` ##### Signature `function claimConditionsUpdatedEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly components: readonly [ { readonly name: "startTimestamp"; readonly type: "uint256" }, { readonly name: "maxClaimableSupply"; readonly type: "uint256"; }, { readonly name: "supplyClaimed"; readonly type: "uint256" }, { readonly name: "quantityLimitPerWallet"; readonly type: "uint256"; }, { readonly name: "merkleRoot"; readonly type: "bytes32" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "metadata"; readonly type: "string" }, ]; readonly name: "claimConditions"; readonly type: "tuple[]"; }, { readonly name: "resetEligibility"; readonly type: "bool" }, ]; readonly name: "ClaimConditionsUpdated"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly components: readonly [ { readonly name: "startTimestamp"; readonly type: "uint256" }, { readonly name: "maxClaimableSupply"; readonly type: "uint256"; }, { readonly name: "supplyClaimed"; readonly type: "uint256" }, { readonly name: "quantityLimitPerWallet"; readonly type: "uint256"; }, { readonly name: "merkleRoot"; readonly type: "bytes32" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "metadata"; readonly type: "string" }, ]; readonly name: "claimConditions"; readonly type: "tuple[]"; }, { readonly name: "resetEligibility"; readonly type: "bool" }, ]; readonly name: "ClaimConditionsUpdated"; readonly type: "event"; }>; ` The prepared event object. ## burn Prepares a transaction to call the "burn" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { burn } from "thirdweb/extensions/erc721"; const transaction = burn({ contract, tokenId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function burn( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "burn" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams) | { asyncParams: () => Promise<[BurnParams](https://portal.thirdweb.com/references/typescript/v5/BurnParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## claimTo Claim ERC721 NFTs to a specified address ### Example #### Basic usage `import { claimTo } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const transaction = claimTo({ contract, to: "0x...", quantity: 1n, }); await sendTransaction({ transaction, account }); ` #### For Drops with allowlists You need to specify the claimer address as the `from` param to avoid any issue with the allowlist `const transaction = claimTo({ contract, to: "0x...", quantity: 1n, from: "0x...", // address of the one claiming }); ` ##### Signature `function claimTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves with the submitted transaction hash. ## claimToBatch This extension batches multiple `claimTo` extensions into one single multicall. Keep in mind that there is a limit of how many NFTs you can claim per transaction. This limit varies depends on the network that you are transacting on. You are recommended to experiment with the number to figure out the best number for your chain of choice. ### Example `import { claimToBatch } from "thirdweb/extensions/erc721"; const transaction = claimToBatch({ contract: nftDropContract, from: claimer.address, // address of the one calling this transaction content: [ { to: "0x...1", quantity: 1n }, { to: "0x...2", quantity: 12n }, { to: "0x...3", quantity: 2n }, ], }); ` ##### Signature `function claimToBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToBatchParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToBatchParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options the transaction options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ClaimToBatchParams](https://portal.thirdweb.com/references/typescript/v5/ClaimToBatchParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## createDelayedRevealBatch Creates a batch of encrypted NFTs that can be revealed at a later time. ### Example `import { createDelayedRevealBatch } from "thirdweb/extensions/erc721"; const placeholderNFT = { name: "Hidden NFT", description: "Will be revealed next week!" }; const realNFTs = [{ name: "Common NFT #1", description: "Common NFT, one of many.", image: ipfs://..., }, { name: "Super Rare NFT #2", description: "You got a Super Rare NFT!", image: ipfs://..., }]; const transaction = createDelayedRevealBatch({ contract, placeholderMetadata: placeholderNFT, metadata: realNFTs, password: "password123", }); const { transactionHash } = await sendTransaction({ transaction, account }); ` ##### Signature `function createDelayedRevealBatch( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateDelayedRevealBatchParams](https://portal.thirdweb.com/references/typescript/v5/CreateDelayedRevealBatchParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options {CreateDelayedRevealBatchParams} - The delayed reveal options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateDelayedRevealBatchParams](https://portal.thirdweb.com/references/typescript/v5/CreateDelayedRevealBatchParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The prepared transaction to send. ## generateMintSignature Generates the payload and signature for minting an ERC721 token. ### Example `import { mintWithSignature, generateMintSignature, } from "thirdweb/extensions/erc721"; const { payload, signature } = await generateMintSignature({ account, contract, mintRequest: { to: "0x...", metadata: { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, }, }); const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise>; ` ### Parameters ##### options The options for the minting process. #### Type `let options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions); ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to the payload and signature. ## getActiveClaimCondition Retrieves the active claim condition. ### Example `import { getActiveClaimCondition } from "thirdweb/extensions/erc721"; const activeClaimCondition = await getActiveClaimCondition({ contract, }); ` ##### Signature `function getActiveClaimCondition( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the active claim condition. ## getActiveClaimConditionId Calls the "getActiveClaimConditionId" function on the contract. ### Example `import { getActiveClaimConditionId } from "thirdweb/extensions/erc721"; const result = await getActiveClaimConditionId({ contract, }); ` ##### Signature `function getActiveClaimConditionId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getActiveClaimConditionId function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getBatchesToReveal Retrieves the batches available to reveal in an NFT contract. ### Example `import { getBatchesToReveal } from "thirdweb/extensions/erc721"; const batches = await getBatchesToReveal({ contract: contract }); const { transactionHash } = await sendTransaction({ transaction, account, }); ` ##### Signature `function getBatchesToReveal( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options {BaseTransactionOptions} - The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: { batchId: bigint; batchUri: string; placeholderMetadata: undefined | NFTMetadata; }; ` A promise resolving to an array of unrevealed batches. Use the `batchId` and corresponding password for each batch to reveal it with `reveal` . reveal ## getAllOwners Retrieves the owners of all ERC721 tokens within a specified range. ### Example `import { getAllOwners } from "thirdweb/extensions/erc721"; const owners = await getAllOwners({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllOwners( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllOwnersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllOwnersParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the owners. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllOwnersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllOwnersParams)>; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to an array of objects containing the token ID and owner address. ## getClaimConditionById Calls the "getClaimConditionById" function on the contract. ### Example `import { getClaimConditionById } from "thirdweb/extensions/erc721"; const result = await getClaimConditionById({ contract, conditionId: ..., }); ` ##### Signature `` function getClaimConditionById( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>, ): Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` ### Parameters ##### options The options for the getClaimConditionById function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetClaimConditionByIdParams](https://portal.thirdweb.com/references/typescript/v5/GetClaimConditionByIdParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint; }>; `` The parsed result of the function call. ## getNFT Retrieves information about a specific ERC721 non-fungible token (NFT). ### Example `import { getNFT } from "thirdweb/extensions/erc721"; const nft = await getNFT({ contract, tokenId: 1n, }); ` ##### Signature `function getNFT( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ includeOwner?: boolean; tokenByIndex?: boolean; tokenId: bigint; }>, ): Promise<[NFT](https://portal.thirdweb.com/references/typescript/v5/NFT)>; ` ### Parameters ##### options The options for retrieving the NFT. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ includeOwner?: boolean; tokenByIndex?: boolean; tokenId: bigint; }>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to the NFT object. ## getClaimConditions Retrieves all claim conditions. ### Example `import { getClaimConditions } from "thirdweb/extensions/erc721"; const conditions = await getClaimConditions({ contract }); ` ##### Signature `function getClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to all claim conditions. ## getNFTs Retrieves an array of NFTs ("ERC721") based on the provided options. ### Example `import { getNFTs } from "thirdweb/extensions/erc721"; const nfts = await getNFTs({ contract, start: 0, count: 10, }); ` ##### Signature `function getNFTs( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTsParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTsParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the NFTs. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetNFTsParams](https://portal.thirdweb.com/references/typescript/v5/GetNFTsParams)>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to an array of NFTs. ## getOwnedNFTs Retrieves the owned NFTs for a given owner. This extension only works with ERC721 contracts that support the [tokenOfOwnerByIndex](https://portal.thirdweb.com/references/typescript/v5/erc721/tokenOfOwnerByIndex) method ### Example `import { getOwnedNFTs } from "thirdweb/extensions/erc721"; const ownedNFTs = await getOwnedNFTs({ contract, owner: "0x1234...", }); ` ##### Signature `function getOwnedNFTs( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the owned NFTs. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>; ` ### Returns ##### Return Type `let returnType: | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; tokenURI: string; type: "ERC721"; } | { id: bigint; metadata: [NFTMetadata](https://portal.thirdweb.com/references/typescript/v5/NFTMetadata); owner: string | null; supply: bigint; tokenURI: string; type: "ERC1155"; }; ` A promise that resolves to an array of NFTs owned by the specified owner. ## getOwnedTokenIds Retrieves the token IDs owned by a specific address. ### Example `import { getOwnedTokenIds } from "thirdweb/extensions/erc721"; const ownedTokenIds = await getOwnedTokenIds({ contract, owner: "0x1234...", }); ` ##### Signature `function getOwnedTokenIds( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the owned token IDs. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BalanceOfParams](https://portal.thirdweb.com/references/typescript/v5/BalanceOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to an array of bigint representing the owned token IDs. ## getTotalUnclaimedSupply Retrieves the total unclaimed supply of ERC721 tokens. ### Example `import { getTotalUnclaimedSupply } from "thirdweb/extensions/erc721"; const totalUnclaimedSupply = await getTotalUnclaimedSupply({ contract, }); ` ##### Signature `function getTotalUnclaimedSupply( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The base transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the total unclaimed supply as a bigint. ## getTotalClaimedSupply Retrieves the total claimed supply of ERC721 tokens. ### Example `import { getTotalClaimedSupply } from "thirdweb/extensions/erc721"; const totalClaimedSupply = await getTotalClaimedSupply({ contract, }); ` ##### Signature `function getTotalClaimedSupply( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The base transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the total claimed supply as a bigint. ## isApprovedForAll Calls the "isApprovedForAll" function on the contract. ### Example `import { isApprovedForAll } from "thirdweb/extensions/erc721"; const result = await isApprovedForAll({ contract, owner: ..., operator: ..., }); ` ##### Signature `function isApprovedForAll( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsApprovedForAllParams](https://portal.thirdweb.com/references/typescript/v5/IsApprovedForAllParams)>, ): Promise; ` ### Parameters ##### options The options for the isApprovedForAll function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsApprovedForAllParams](https://portal.thirdweb.com/references/typescript/v5/IsApprovedForAllParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isBurnSupported Checks if the `burn` method is supported by the given contract. ### Example `import { isBurnSupported } from "thirdweb/extensions/erc721"; const supported = isBurnSupported(["0x..."]); ` ##### Signature `function isBurnSupported(availableSelectors: Array): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `burn` method is supported. ## isClaimToSupported Checks if the `claimTo` method is supported by the given contract. ### Example `import { isClaimToSupported } from "thirdweb/extensions/erc721"; const supported = isClaimToSupported(["0x..."]); ` ##### Signature `function isClaimToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `claimTo` method is supported. ## isCreateDelayedRevealBatchSupported Checks if the `createDelayedRevealBatch` method is supported by the given contract. ### Example `import { isCreateDelayedRevealBatchSupported } from "thirdweb/extensions/erc721"; const supported = isCreateDelayedRevealBatchSupported(["0x..."]); ` ##### Signature `function isCreateDelayedRevealBatchSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `createDelayedRevealBatch` method is supported. ## isERC721 Check if a contract supports the ERC721 interface. ### Example `import { isERC721 } from "thirdweb/extensions/erc721"; const result = await isERC721({ contract }); ` ##### Signature `function isERC721(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The transaction options. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating whether the contract supports the ERC721 interface. ## isGetActiveClaimConditionIdSupported Checks if the `getActiveClaimConditionId` method is supported by the given contract. ### Example `import { isGetActiveClaimConditionIdSupported } from "thirdweb/extensions/erc721"; const supported = isGetActiveClaimConditionIdSupported(["0x..."]); ` ##### Signature `function isGetActiveClaimConditionIdSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getActiveClaimConditionId` method is supported. ## isGetBatchesToRevealSupported Checks if the `getBatchesToReveal` method is supported by the given contract. ### Example `import { isGetBatchesToRevealSupported } from "thirdweb/extensions/erc721"; const supported = isGetBatchesToRevealSupported(["0x..."]); ` ##### Signature `function isGetBatchesToRevealSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getBatchesToReveal` method is supported. ## isGetActiveClaimConditionSupported Checks if the `getActiveClaimCondition` method is supported by the given contract. ### Example `import { isGetActiveClaimConditionSupported } from "thirdweb/extensions/erc721"; const supported = isGetActiveClaimConditionSupported(["0x..."]); ` ##### Signature `function isGetActiveClaimConditionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getActiveClaimCondition` method is supported. ## isGetClaimConditionByIdSupported Checks if the `getClaimConditionById` method is supported by the given contract. ### Example `import { isGetClaimConditionByIdSupported } from "thirdweb/extensions/erc721"; const supported = isGetClaimConditionByIdSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionByIdSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditionById` method is supported. ## isGetClaimConditionsSupported Checks if the `getClaimConditions` method is supported by the given contract. ### Example `import { isGetClaimConditionsSupported } from "thirdweb/extensions/erc721"; const supported = isGetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditions` method is supported. ## isGetNFTSupported Checks if the `tokenURI` method is supported by the given contract. ### Example `import { isTokenURISupported } from "thirdweb/extensions/erc721"; const supported = isTokenURISupported(["0x..."]); ` ##### Signature `function isGetNFTSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `tokenURI` method is supported. ## isGetClaimConditionsSupported Checks if the `getClaimConditions` method is supported by the given contract. ### Example `import { isGetClaimConditionsSupported } from "thirdweb/extensions/erc721"; const supported = isGetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isGetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getClaimConditions` method is supported. ## isLazyMintSupported Checks if the `lazyMint` method is supported by the given contract. ### Example `import { isLazyMintSupported } from "thirdweb/extensions/erc721"; const supported = isLazyMintSupported(["0x..."]); ` ##### Signature `function isLazyMintSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `lazyMint` method is supported. ## isGetNFTsSupported Checks if the `getNFTs` method is supported by the given contract. ### Example `import { isGetNFTsSupported } from "thirdweb/extensions/erc721"; const supported = isGetNFTsSupported(["0x..."]); ` ##### Signature `function isGetNFTsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getNFTs` method is supported. ## isMintToSupported Checks if the `mintTo` method is supported by the given contract. ### Example `import { isMintToSupported } from "thirdweb/extensions/erc721"; const supported = isMintToSupported(["0x..."]); ` ##### Signature `function isMintToSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `mintTo` method is supported. ## isNextTokenIdToMintSupported Checks if the `nextTokenIdToMint` method is supported by the given contract. ### Example `import { isNextTokenIdToMintSupported } from "thirdweb/extensions/erc721"; const supported = isNextTokenIdToMintSupported(["0x..."]); ` ##### Signature `function isNextTokenIdToMintSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `nextTokenIdToMint` method is supported. ## isResetClaimEligibilitySupported Checks if the `resetClaimEligibility` method is supported by the given contract. ### Example `import { isResetClaimEligibilitySupported } from "thirdweb/extensions/erc721"; const supported = isResetClaimEligibilitySupported(["0x..."]); ` ##### Signature `function isResetClaimEligibilitySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `resetClaimEligibility` method is supported. ## isTokenByIndexSupported Checks if the `tokenByIndex` method is supported by the given contract. ### Example `import { isTokenByIndexSupported } from "thirdweb/extensions/erc721"; const supported = isTokenByIndexSupported(["0x..."]); ` ##### Signature `function isTokenByIndexSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `tokenByIndex` method is supported. ## isSetClaimConditionsSupported Checks if the `setClaimConditions` method is supported by the given contract. ### Example `import { isSetClaimConditionsSupported } from "thirdweb/extensions/erc721"; const supported = isSetClaimConditionsSupported(["0x..."]); ` ##### Signature `function isSetClaimConditionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setClaimConditions` method is supported. ## isSetSharedMetadataSupported Checks if the `setSharedMetadata` method is supported by the given contract. ### Example `import { isSetSharedMetadataSupported } from "thirdweb/extensions/erc721"; const supported = isSetSharedMetadataSupported(["0x..."]); ` ##### Signature `function isSetSharedMetadataSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setSharedMetadata` method is supported. ## isSharedMetadataSupported Checks if the `sharedMetadata` method is supported by the given contract. ### Example `import { isSharedMetadataSupported } from "thirdweb/extensions/erc721"; const supported = isSharedMetadataSupported(["0x..."]); ` ##### Signature `function isSharedMetadataSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `sharedMetadata` method is supported. ## isTotalSupplySupported Checks if the `totalSupply` method is supported by the given contract. ### Example `import { isTotalSupplySupported } from "thirdweb/extensions/erc721"; const supported = isTotalSupplySupported(["0x..."]); ` ##### Signature `function isTotalSupplySupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `totalSupply` method is supported. ## isUpdateMetadataSupported Checks if the `updateMetadata` method is supported by the given contract. ### Example `import { isUpdateMetadataSupported } from "thirdweb/extensions/erc721"; const supported = isUpdateMetadataSupported(["0x..."]); ` ##### Signature `function isUpdateMetadataSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `updateMetadata` method is supported. ## isUpdateMetadataSupported Checks if the `updateMetadata` method is supported by the given contract. ### Example `import { isUpdateMetadataSupported } from "thirdweb/extensions/erc721"; const supported = isUpdateMetadataSupported(["0x..."]); ` ##### Signature `function isUpdateMetadataSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `updateMetadata` method is supported. ## isUpdateTokenURISupported Checks if the `setTokenURI` method is supported by the given contract. ### Example `import { isSetTokenURISupported } from "thirdweb/extensions/erc721"; const supported = isSetTokenURISupported(["0x..."]); ` ##### Signature `function isUpdateTokenURISupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `setTokenURI` method is supported. ## mintTo Mints a new ERC721 token and assigns it to the specified address. If the `nft` parameter is a string, it will be used as the token URI. If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI. ### Example `import { mintTo } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const transaction = mintTo({ contract, to: "0x...", nft: { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, }); await sendTransaction({ transaction, account }); ` ##### Signature `function mintTo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The transaction options. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintToParams](https://portal.thirdweb.com/references/typescript/v5/MintToParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## lazyMint Lazily mints ERC721 tokens. ### Example `import { lazyMint } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const transaction = lazyMint({ contract, nfts: [ { name: "My NFT", description: "This is my NFT", image: "https://example.com/image.png", }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function lazyMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[LazyMintParams](https://portal.thirdweb.com/references/typescript/v5/LazyMintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the lazy minting process. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[LazyMintParams](https://portal.thirdweb.com/references/typescript/v5/LazyMintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared contract call. ## mintWithSignature Mints a new ERC721 token with the given minter signature ### Example `import { mintWithSignature, generateMintSignature } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const { payload, signature } = await generateMintSignature(...) const transaction = mintWithSignature({ contract, payload, signature, }); await sendTransaction({ transaction, account }); ` ##### Signature `` function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | { payload: { currency: string; pricePerToken: bigint; primarySaleRecipient: string; quantity: bigint; royaltyBps: bigint; royaltyRecipient: string; to: string; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; } | { payload: { currency: string; price: bigint; primarySaleRecipient: string; royaltyBps: bigint; royaltyRecipient: string; to: string; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); `` ### Parameters ##### options The transaction options. #### Type `` let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | { payload: { currency: string; pricePerToken: bigint; primarySaleRecipient: string; quantity: bigint; royaltyBps: bigint; royaltyRecipient: string; to: string; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; } | { payload: { currency: string; price: bigint; primarySaleRecipient: string; royaltyBps: bigint; royaltyRecipient: string; to: string; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint; }; signature: `0x${string}`; } >; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## nextTokenIdToMint Calls the "nextTokenIdToMint" function on the contract. ### Example `import { nextTokenIdToMint } from "thirdweb/extensions/erc721"; const result = await nextTokenIdToMint({ contract, }); ` ##### Signature `function nextTokenIdToMint( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the nextTokenIdToMint function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## resetClaimEligibility Reset the claim eligibility for all users. ### Example `import { resetClaimEligibility } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const transaction = resetClaimEligibility({ contract, }); await sendTransaction({ transaction, account }); ` ##### Signature `function resetClaimEligibility( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## reveal Reveals a previously lazy minted batch of NFTs. ### Example `import { reveal } from "thirdweb/extensions/erc721"; const transaction = await reveal({ contract: contract, batchId: 0, password: "password", }); const { transactionHash } = await sendTransaction({ transaction, account, }); ` ##### Signature `function reveal( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RevealParams](https://portal.thirdweb.com/references/typescript/v5/RevealParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options {RevealParams} - The reveal parameters. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RevealParams](https://portal.thirdweb.com/references/typescript/v5/RevealParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The prepared transaction to send. ## ownerOf Calls the "ownerOf" function on the contract. ### Example `import { ownerOf } from "thirdweb/extensions/erc721"; const result = await ownerOf({ contract, tokenId: ..., }); ` ##### Signature `function ownerOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[OwnerOfParams](https://portal.thirdweb.com/references/typescript/v5/OwnerOfParams)>, ): Promise; ` ### Parameters ##### options The options for the ownerOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[OwnerOfParams](https://portal.thirdweb.com/references/typescript/v5/OwnerOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setApprovalForAll Prepares a transaction to call the "setApprovalForAll" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setApprovalForAll } from "thirdweb/extensions/erc721"; const transaction = setApprovalForAll({ contract, operator: ..., approved: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setApprovalForAll( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams) | { asyncParams: () => Promise<[SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setApprovalForAll" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams) | { asyncParams: () => Promise<[SetApprovalForAllParams](https://portal.thirdweb.com/references/typescript/v5/SetApprovalForAllParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setClaimConditions Set the claim conditions for a ERC721 drop ### Example `import { setClaimConditions } from "thirdweb/extensions/erc721"; import { sendTransaction } from "thirdweb"; const transaction = setClaimConditions({ contract, phases: [ { maxClaimableSupply: 100n, maxClaimablePerWallet: 1n, currencyAddress: "0x...", price: 0.1, startTime: new Date(), }, ], }); await sendTransaction({ transaction, account }); ` ##### Signature `function setClaimConditions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetClaimConditionsParams](https://portal.thirdweb.com/references/typescript/v5/SetClaimConditionsParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## setSharedMetadata Sets the shared metadata for a OpenEdition contract. ##### Signature `function setSharedMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the transaction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The prepared transaction. ## setTokenURI Prepares a transaction to call the "setTokenURI" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setTokenURI } from "thirdweb/extensions/erc721"; const transaction = setTokenURI({ contract, tokenId: ..., uri: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTokenURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams) | { asyncParams: () => Promise<[SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTokenURI" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams) | { asyncParams: () => Promise<[SetTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/SetTokenURIParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## sharedMetadataUpdatedEvent Creates an event object for the SharedMetadataUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { sharedMetadataUpdatedEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [sharedMetadataUpdatedEvent()], }); ` ##### Signature `function sharedMetadataUpdatedEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "name"; readonly type: "string" }, { readonly name: "description"; readonly type: "string" }, { readonly name: "imageURI"; readonly type: "string" }, { readonly name: "animationURI"; readonly type: "string" }, ]; readonly name: "SharedMetadataUpdated"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "name"; readonly type: "string" }, { readonly name: "description"; readonly type: "string" }, { readonly name: "imageURI"; readonly type: "string" }, { readonly name: "animationURI"; readonly type: "string" }, ]; readonly name: "SharedMetadataUpdated"; readonly type: "event"; }>; ` The prepared event object. ## sharedMetadata Calls the "sharedMetadata" function on the contract. ### Example `import { sharedMetadata } from "thirdweb/extensions/erc721"; const result = await sharedMetadata({ contract, }); ` ##### Signature `function sharedMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the sharedMetadata function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## tokenOfOwnerByIndex Calls the "tokenOfOwnerByIndex" function on the contract. ### Example `import { tokenOfOwnerByIndex } from "thirdweb/extensions/erc721"; const result = await tokenOfOwnerByIndex({ contract, owner: ..., index: ..., }); ` ##### Signature `function tokenOfOwnerByIndex( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenOfOwnerByIndexParams](https://portal.thirdweb.com/references/typescript/v5/TokenOfOwnerByIndexParams)>, ): Promise; ` ### Parameters ##### options The options for the tokenOfOwnerByIndex function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenOfOwnerByIndexParams](https://portal.thirdweb.com/references/typescript/v5/TokenOfOwnerByIndexParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## startTokenId Calls the "startTokenId" function on the contract. ### Example `import { startTokenId } from "thirdweb/extensions/erc721"; const result = await startTokenId({ contract, }); ` ##### Signature `function startTokenId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the startTokenId function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## tokenURIRevealedEvent Creates an event object for the TokenURIRevealed event. ### Example `import { getContractEvents } from "thirdweb"; import { tokenURIRevealedEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ tokenURIRevealedEvent({ index: ..., }) ], }); ` ##### Signature `function tokenURIRevealedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "index"; readonly type: "uint256"; }, { readonly name: "revealedURI"; readonly type: "string" }, ]; readonly name: "TokenURIRevealed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "index"; readonly type: "uint256"; }, { readonly name: "revealedURI"; readonly type: "string" }, ]; readonly name: "TokenURIRevealed"; readonly type: "event"; }>; ` The prepared event object. ## tokensClaimedEvent Creates an event object for the TokensClaimed event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensClaimedEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ tokensClaimedEvent({ claimConditionIndex: ..., claimer: ..., receiver: ..., }) ], }); ` ##### Signature `function tokensClaimedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "startTokenId"; readonly type: "uint256" }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "claimConditionIndex"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "claimer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "receiver"; readonly type: "address"; }, { readonly name: "startTokenId"; readonly type: "uint256" }, { readonly name: "quantityClaimed"; readonly type: "uint256" }, ]; readonly name: "TokensClaimed"; readonly type: "event"; }>; ` The prepared event object. ## tokenURI Calls the "tokenURI" function on the contract. ### Example `import { tokenURI } from "thirdweb/extensions/erc721"; const result = await tokenURI({ contract, tokenId: ..., }); ` ##### Signature `function tokenURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenURIParams](https://portal.thirdweb.com/references/typescript/v5/TokenURIParams)>, ): Promise; ` ### Parameters ##### options The options for the tokenURI function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenURIParams](https://portal.thirdweb.com/references/typescript/v5/TokenURIParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## tokensLazyMintedEvent Creates an event object for the TokensLazyMinted event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensLazyMintedEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ tokensLazyMintedEvent({ startTokenId: ..., }) ], }); ` ##### Signature `function tokensLazyMintedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "startTokenId"; readonly type: "uint256"; }, { readonly name: "endTokenId"; readonly type: "uint256" }, { readonly name: "baseURI"; readonly type: "string" }, { readonly name: "encryptedBaseURI"; readonly type: "bytes" }, ]; readonly name: "TokensLazyMinted"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "startTokenId"; readonly type: "uint256"; }, { readonly name: "endTokenId"; readonly type: "uint256" }, { readonly name: "baseURI"; readonly type: "string" }, { readonly name: "encryptedBaseURI"; readonly type: "bytes" }, ]; readonly name: "TokensLazyMinted"; readonly type: "event"; }>; ` The prepared event object. ## tokensMintedWithSignatureEvent Creates an event object for the TokensMintedWithSignature event. ### Example `import { getContractEvents } from "thirdweb"; import { tokensMintedWithSignatureEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ tokensMintedWithSignatureEvent({ signer: ..., mintedTo: ..., tokenIdMinted: ..., }) ], }); ` ##### Signature `function tokensMintedWithSignatureEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenIdMinted"; readonly type: "uint256"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "royaltyRecipient"; readonly type: "address"; }, { readonly name: "royaltyBps"; readonly type: "uint256" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "uri"; readonly type: "string" }, { readonly name: "price"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintpayload"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "signer"; readonly type: "address"; }, { readonly indexed: true; readonly name: "mintedTo"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenIdMinted"; readonly type: "uint256"; }, { readonly components: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "royaltyRecipient"; readonly type: "address"; }, { readonly name: "royaltyBps"; readonly type: "uint256" }, { readonly name: "primarySaleRecipient"; readonly type: "address"; }, { readonly name: "uri"; readonly type: "string" }, { readonly name: "price"; readonly type: "uint256" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "validityStartTimestamp"; readonly type: "uint128"; }, { readonly name: "validityEndTimestamp"; readonly type: "uint128"; }, { readonly name: "uid"; readonly type: "bytes32" }, ]; readonly name: "mintpayload"; readonly type: "tuple"; }, ]; readonly name: "TokensMintedWithSignature"; readonly type: "event"; }>; ` The prepared event object. ## tokensOfOwner Calls the "tokensOfOwner" function on the contract. ### Example `import { tokensOfOwner } from "thirdweb/extensions/erc721"; const result = await tokensOfOwner({ contract, owner: ..., }); ` ##### Signature `function tokensOfOwner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokensOfOwnerParams](https://portal.thirdweb.com/references/typescript/v5/TokensOfOwnerParams)>) : Promise> ` ### Parameters ##### options The options for the tokensOfOwner function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokensOfOwnerParams](https://portal.thirdweb.com/references/typescript/v5/TokensOfOwnerParams)>; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## transferEvent Creates an event object for the Transfer event. ### Example `import { getContractEvents } from "thirdweb"; import { transferEvent } from "thirdweb/extensions/erc721"; const events = await getContractEvents({ contract, events: [ transferEvent({ from: ..., to: ..., tokenId: ..., }) ], }); ` ##### Signature `function transferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "tokenId"; readonly type: "uint256"; }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` The prepared event object. ## isRevealSupported Checks if the `reveal` method is supported by the given contract. ### Example `import { isRevealSupported } from "thirdweb/extensions/erc721"; const supported = isRevealSupported(["0x..."]); ` ##### Signature `function isRevealSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `reveal` method is supported. ## updateMetadata Update the metadata of the single token in an NFT Drop (DropERC721) collection For NFT Collection, please use `setTokenURI` ### Example `import { updateMetadata } from "thirdweb/extensions/erc721"; const transaction = updateMetadata({ contract, targetTokenId: 0n, client: thirdwebClient, newMetadata: { name: "this is the new nft name", description: "...", image: "new image uri", // ... }, }); ` ##### Signature `function updateMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UpdateMetadataParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateMetadataParams](https://portal.thirdweb.com/references/typescript/v5/UpdateMetadataParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction ## updateTokenURI This function is an abstracted layer of the [setTokenURI extension](https://portal.thirdweb.com/references/typescript/v5/erc721/setTokenURI) , which means it uses `setTokenURI` under the hood. While the `setTokenURI` method only takes in a uri string, this extension takes in a user-friendly [NFTInput](https://portal.thirdweb.com/references/typescript/v5/NFTInput) , upload that content to IPFS and pass the IPFS URI (of said `NFTInput` ) to the underlying `setTokenURI` method. This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update. ### Example `import { updateTokenURI } from "thirdweb/extensions/erc721"; const transaction = updateTokenURI({ tokenId: 0n, nft: { name: "new name", description: "new description", image: "https://image-host.com/new-image.png", }, }); ` ##### Signature `function updateTokenURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/UpdateTokenURIParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateTokenURIParams](https://portal.thirdweb.com/references/typescript/v5/UpdateTokenURIParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` the prepared transaction from `setTokenURI` ## estimateGas Estimates the gas required to execute a transaction. The gas is returned as a `bigint` and in gwei units. ### Example `import { estimateGas } from "thirdweb"; const gas = await estimateGas({ transaction, from: "0x...", }); ` ##### Signature `function estimateGas(options: [EstimateGasOptions](https://portal.thirdweb.com/references/typescript/v5/EstimateGasOptions)): Promise; ` ### Parameters ##### options The options for estimating gas. #### Type `let options: Prettify< { transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); from?: never } | { account?: never; from?: string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } ) >; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the estimated gas as a bigint. ## estimateGasCost Estimate the gas cost of a transaction in ether and wei. ### Example `import { estimateGasCost } from "thirdweb"; const gasCost = await estimateGasCost({ transaction }); ` ##### Signature `function estimateGasCost( options: [EstimateGasOptions](https://portal.thirdweb.com/references/typescript/v5/EstimateGasOptions), ): Promise<[EstimateGasCostResult](https://portal.thirdweb.com/references/typescript/v5/EstimateGasCostResult)>; ` ### Parameters ##### options #### Type `let options: Prettify< { transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); from?: never } | { account?: never; from?: string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } ) >; ` ### Returns ##### Return Type `let returnType: { ether: string; wei: bigint }; ` ## erc7579 Config for a ERC7579 modular smart wallet. This configuration is in BETA, expect breaking changes. ### Example `import { sepolia } from "thirdweb/chains"; import { smartWallet, Config } from "thirdweb/wallets/smart"; const modularSmartWallet = smartWallet( Config.erc7579({ chain: sepolia, sponsorGas: true, factoryAddress: "0x...", // the 7579 factory address validatorAddress: "0x...", // the default validator module address }), }); ` ##### Signature `function erc7579(options: [ERC7579Config](https://portal.thirdweb.com/references/typescript/v5/ERC7579Config)): [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ### Parameters ##### options Optional overrides for the smart wallet. #### Type `let options: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) & { factoryAddress: string; validatorAddress: string; }; ` ### Returns ##### Return Type `let returnType: Prettify< { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); factoryAddress?: string; overrides?: { accountAddress?: string; accountSalt?: string; bundlerUrl?: string; createAccount?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); entrypointAddress?: string; execute?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transaction: SendTransactionOption, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); executeBatch?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transactions: Array, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); getAccountNonce?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), ) => Promise; paymaster?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; predictAddress?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => Promise; signMessage?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); message: SignableMessage; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; signTypedData?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); typedData: ox__TypedData.Definition; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; tokenPaymaster?: TokenPaymasterConfig; }; sessionKey?: { address: string; permissions: AccountPermissions }; } & ({ gasless: boolean } | { sponsorGas: boolean }) >; ` The smart wallet options. ## estimateUserOpGas Estimate the gas cost of a user operation. ### Example `import { estimateUserOpGas } from "thirdweb/wallets/smart"; const gasCost = await estimateUserOpGas({ userOp, options, }); ` ##### Signature `function estimateUserOpGas( args: { options: BundlerOptions; userOp: UserOperationV06 | UserOperationV07; }, stateOverrides?: {}, ): Promise; ` ### Parameters ##### args The options for estimating the gas cost of a user operation. #### Type `let args: { options: BundlerOptions; userOp: UserOperationV06 | UserOperationV07; }; ` ##### stateOverrides optional ### Returns ##### Return Type `let returnType: Promise; ` The estimated gas cost of the user operation. ## estimateUserOpGasCost Estimate the gas cost of a user operation. ### Example `import { estimateUserOpGasCost } from "thirdweb/wallets/smart"; const gasCost = await estimateUserOpGasCost({ transactions, adminAccount, client, smartWalletOptions, }); ` ##### Signature `function estimateUserOpGasCost(args: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); smartWalletOptions: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }): Promise<{ ether: string; wei: bigint }>; ` ### Parameters ##### args The options for estimating the gas cost of a user operation. #### Type `let args: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); smartWalletOptions: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }; ` ### Returns ##### Return Type `let returnType: Promise<{ ether: string; wei: bigint }>; ` The estimated gas cost of the user operation. ## eth\_blockNumber Retrieves the current block number from the Ethereum blockchain. ### Example `import { getRpcClient, eth_blockNumber } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const blockNumber = await eth_blockNumber(rpcRequest); ` ##### Signature `` function eth_blockNumber( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current block number as a bigint. ## totalSupply Calls the "totalSupply" function on the contract. ### Example `import { totalSupply } from "thirdweb/extensions/erc721"; const result = await totalSupply({ contract, }); ` ##### Signature `function totalSupply( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalSupply function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## eth\_estimateGas Estimates the gas required to execute a transaction on the Ethereum network. ### Example `import { getRpcClient, eth_estimateGas } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const gas = await eth_estimateGas(rpcRequest, { to: "0x...", ... }); ` ##### Signature `` function eth_estimateGas( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, transactionRequest: RpcTransactionRequest, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### transactionRequest The transaction request object. #### Type `let transactionRequest: RpcTransactionRequest; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the estimated gas as a bigint. ## eth\_getBalance Retrieves the balance of the specified Ethereum address. ### Example `import { getRpcClient, eth_getBalance } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const balance = await eth_getBalance(rpcRequest, { address: "0x...", }); ` ##### Signature `` function eth_getBalance( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: [GetBalanceParams](https://portal.thirdweb.com/references/typescript/v5/GetBalanceParams), ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving the balance. #### Type `let params: { address: string }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the balance of the address in wei as bigint. ## eth\_call Executes a call or a transaction on the Ethereum network. ### Example `import { getRpcClient, eth_call } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const result = await eth_call(rpcRequest, { to: "0x...", ... }); ` ##### Signature `` function eth_call( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: Partial & { blockNumber?: number | bigint; blockTag?: BlockTag | undefined; stateOverrides?: StateOverride; }, ): Promise<`0x${string}`>; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for the call or transaction. #### Type `let params: Partial & { blockNumber?: number | bigint; blockTag?: BlockTag | undefined; stateOverrides?: StateOverride; }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the result of the call or transaction. ## eth\_getStorageAt Retrieves the value stored at a specific position in the storage of a contract. ### Example `import { getRpcClient, eth_getStorageAt } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const storageValue = await eth_getStorageAt(rpcRequest, { address: "0x...", position: 0n, }); ` ##### Signature `` function eth_getStorageAt( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetStorageAtParams, ): Promise<`0x${string}`>; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for the eth\_getStorageAt method. #### Type `let params: GetStorageAtParams; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the value stored at the specified position. ## eth\_getLogs Retrieves logs from the Ethereum blockchain based on the specified parameters. ### Example `import { getRpcClient, eth_getLogs } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const logs = await eth_getLogs(rpcRequest, { address: "0x...", fromBlock: 123456n, toBlock: 123456n, }); ` ##### Signature `` function eth_getLogs( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetLogsParams, ): Promise>; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving logs. #### Type `let params: GetLogsParams; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to the retrieved logs. ## eth\_getCode Retrieves the bytecode of a smart contract at the specified address. ### Example `import { getRpcClient, eth_getCode } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const bytecode = await eth_getCode(rpcRequest, { address: "0x...", }); ` ##### Signature `` function eth_getCode( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetCodeParams, ): Promise<`0x${string}`>; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for the eth\_getCode method. #### Type `let params: GetCodeParams; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the bytecode of the smart contract. ## eth\_getTransactionByHash Retrieves a transaction by its hash. ### Example `import { getRpcClient, eth_getTransactionByHash } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const transaction = await eth_getTransactionByHash(rpcRequest, { hash: "0x...", }); ` ##### Signature `` function eth_getTransactionByHash( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetTransactionByHashParameters, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving the transaction. #### Type `let params: GetTransactionByHashParameters; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the transaction. ## eth\_gasPrice Retrieves the current gas price from the Ethereum network. ### Example `import { getRpcClient, eth_gasPrice } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const gasPrice = await eth_gasPrice(rpcRequest); ` ##### Signature `` function eth_gasPrice( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the gas price as a bigint. ## eth\_getTransactionCount Retrieves the transaction count (nonce) for a given Ethereum address. ### Example `import { getRpcClient, eth_getTransactionCount } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const transactionCount = await eth_getTransactionCount(rpcRequest, { address: "0x...", }); ` ##### Signature `` function eth_getTransactionCount( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetTransactionCountParameters, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving the transaction count. #### Type `let params: GetTransactionCountParameters; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the transaction count as a number. ## eth\_sendRawTransaction Sends a raw transaction to the Ethereum network. ### Example `import { getRpcClient, eth_sendRawTransaction } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const transactionHash = await eth_sendRawTransaction( rpcRequest, "0x...", ); ` ##### Signature `` function eth_sendRawTransaction( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, signedTransaction: `0x${string}`, ): Promise<`0x${string}`>; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### signedTransaction The signed transaction in hex format. #### Type `` let signedTransaction: `0x${string}`; `` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the transaction hash. ## eth\_maxPriorityFeePerGas Retrieves the maximum priority fee per gas from the Ethereum network. ### Example `import { getRpcClient, eth_maxPriorityFeePerGas } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const maxPriorityFeePerGas = await eth_maxPriorityFeePerGas(rpcRequest); ` ##### Signature `` function eth_maxPriorityFeePerGas( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to a bigint representing the maximum priority fee per gas. ## eth\_getTransactionReceipt Retrieves the transaction receipt for a given transaction hash. Throws an error if the receipt is not found. ### Example `import { getRpcClient, eth_getTransactionReceipt, } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const transactionReceipt = await eth_getTransactionReceipt( rpcRequest, { hash: "0x...", }, ); ` ##### Signature `` function eth_getTransactionReceipt( request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >, params: GetTransactionReceiptParameters, ): Promise; `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving the transaction receipt. #### Type `let params: GetTransactionReceiptParameters; ` ### Returns ##### Return Type `let returnType: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` A promise that resolves to the transaction receipt. ## transferFrom Prepares a transaction to call the "transferFrom" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { transferFrom } from "thirdweb/extensions/erc721"; const transaction = transferFrom({ contract, from: ..., to: ..., tokenId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function transferFrom( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams) | { asyncParams: () => Promise<[TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "transferFrom" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams) | { asyncParams: () => Promise<[TransferFromParams](https://portal.thirdweb.com/references/typescript/v5/TransferFromParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## extractMinimalProxyImplementationAddress Extracts the implementation address from a given bytecode string if it matches any of the known minimal proxy patterns. ### Example `import { extractMinimalProxyImplementationAddress } from "thirdweb/utils"; const bytecode = "0x363d3d373d3d3d363d73..."; const implementationAddress = extractMinimalProxyImplementationAddress(bytecode); ` ##### Signature `function extractMinimalProxyImplementationAddress( bytecode: string, ): undefined | string; ` ### Parameters ##### bytecode The bytecode string to extract the implementation address from. #### Type `let bytecode: string; ` ### Returns ##### Return Type `let returnType: undefined | string; ` The implementation address as a string if a match is found, otherwise undefined. ## extractIPFSUri Extracts the IPFS URI from the given bytecode. ### Example `import { extractIPFSUri } from "thirdweb/utils/bytecode/extractIPFS"; const bytecode = "0x363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"; const ipfsHash = extractIPFSUri(bytecode); console.log(ipfsHash); ` ##### Signature `function extractIPFSUri(bytecode: string): undefined | string; ` ### Parameters ##### bytecode The bytecode to extract the IPFS URI from. #### Type `let bytecode: string; ` ### Returns ##### Return Type `let returnType: undefined | string; ` The IPFS URI if found, otherwise undefined. ## execute Execute a transaction based on a prompt. ### Example `import { Nebula } from "thirdweb/ai"; const wallet = createWallet("io.metamask"); const account = wallet.connect({ client }); const result = await Nebula.execute({ client, account, // transactions will be sent from this account message: "send 0.0001 ETH to vitalik.eth", contextFilter: { chains: [sepolia], }, }); ` Multi message prompt: `Nebula.execute({ client, account, messages: [ { role: "user", content: "What's the address of vitalik.eth" }, { role: "assistant", content: "The address of vitalik.eth is 0xd8dA6BF26964aF8E437eEa5e3616511D7G3a3298", }, { role: "user", content: "Send them 0.0001 ETH" }, ], contextFilter: { chains: [sepolia], }, }); ` ##### Signature `function execute( input: [Input](https://portal.thirdweb.com/references/typescript/v5/Input) & { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) }, ): Promise; ` ### Parameters ##### input The input for the transaction. #### Type `let input: [Input](https://portal.thirdweb.com/references/typescript/v5/Input) & { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) }; ` ### Returns ##### Return Type `let returnType: Promise; ` The transaction hash. This API is in early access and might change in the future. ## ethers6Adapter The ethers6 adapter provides a way to convert between Thirdweb contracts, accounts, and providers. `` let ethers6Adapter: { contract: { fromEthers: ( options: FromEthersContractOptions, ) => Promise>>; toEthers: (options: { account?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); thirdwebContract: Readonly; }) => Promise; }; provider: { toEthers: (options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => JsonRpcProvider; }; signer: { fromEthers: (options: { signer: Signer }) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; toEthers: (options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Signer; }; }; `` ##### contract Converts a ThirdwebContract to an ethers.js Contract or the other way around. `` type contract = { fromEthers: ( options: FromEthersContractOptions, ) => Promise>>; toEthers: (options: { account?: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); thirdwebContract: Readonly; }) => Promise; }; `` ### Example #### toEthers `import { ethers6Adapter } from "thirdweb/adapters/ethers6"; const ethersContract = await ethers6Adapter.contract.toEthers({ thirdwebContract, account, }); ` #### fromEthers `import { ethers6Adapter } from "thirdweb/adapters"; const contract = ethers6Adapter.contract.fromEthers({ client, chain, ethersContract, }); ` ##### provider Converts a Thirdweb client and chain ID into an ethers.js provider. `type provider = { toEthers: (options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => JsonRpcProvider; }; ` ### Example `import { ethers6Adapter } from "thirdweb/adapters/ethers6"; const provider = ethers6Adapter.provider.toEthers({ client, chain }); ` ##### signer Converts an ethers6 Signer into a Wallet object or the other way around. `type signer = { fromEthers: (options: { signer: Signer }) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; toEthers: (options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Signer; }; ` ### Example #### fromEthersSigner `import { ethers6Adapter } from "thirdweb/adapters/ethers6"; const signer = ethers6Adapter.signer.fromEthersSigner({ signer }); ` #### toEthersSigner `import { ethers6Adapter } from "thirdweb/adapters/ethers6"; const signer = await ethers6Adapter.signer.toEthers({ client, chain, account, }); ` ## ethers5Adapter The ethers5 adapter provides a way to convert between Thirdweb contracts, accounts, and providers. `` let ethers5Adapter: { contract: { fromEthers: ( options: FromEthersContractOptions, ) => Promise>>; toEthers: (options: { thirdwebContract: Readonly; }) => Promise; }; provider: { toEthers: (options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Provider; }; signer: { fromEthers: (options: { signer: Signer }) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; toEthers: (options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise; }; }; `` ##### contract Converts a ThirdwebContract to an ethers.js Contract or the other way around. `` type contract = { fromEthers: ( options: FromEthersContractOptions, ) => Promise>>; toEthers: (options: { thirdwebContract: Readonly; }) => Promise; }; `` ### Example #### toEthers `import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const ethersContract = await ethers5Adapter.contract.toEthers({ thirdwebContract, }); ` #### fromEthers `import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const twContract = await ethers5Adapter.contract.fromEthers({ client, ethersContract, chain: defineChain(1), // Replace with your chain }); ` ##### provider Converts a Thirdweb client and chain ID into an ethers.js provider. `type provider = { toEthers: (options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Provider; }; ` ### Example `import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const provider = ethers5Adapter.provider.toEthers({ client, chainId, }); ` Once you have converted a thirdweb Client to ethers Provider, you can use it like any other ethers provider: `const blockNumber = await provider.getBlockNumber(); ` ##### signer Converts an ethers5 Signer into a Wallet object or the other way around. `type signer = { fromEthers: (options: { signer: Signer }) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; toEthers: (options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise; }; ` ### Example #### fromEthers `import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const wallet = await ethers5Adapter.signer.fromEthers({ signer }); ` #### toEthers `import { ethers5Adapter } from "thirdweb/adapters/ethers5"; const signer = await ethers5Adapter.signer.toEthers({ client, chain, account, }); ` ## CHANGE\_RECOVERY\_ADDRESS\_TYPEHASH Calls the "CHANGE\_RECOVERY\_ADDRESS\_TYPEHASH" function on the contract. ### Example `import { CHANGE_RECOVERY_ADDRESS_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await CHANGE_RECOVERY_ADDRESS_TYPEHASH({ contract, }); ` ##### Signature `` function CHANGE_RECOVERY_ADDRESS_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the CHANGE\_RECOVERY\_ADDRESS\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## ADD\_TYPEHASH Calls the "ADD\_TYPEHASH" function on the contract. ### Example `import { ADD_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await ADD_TYPEHASH({ contract, }); ` ##### Signature `` function ADD_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the ADD\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## TRANSFER\_TYPEHASH Calls the "TRANSFER\_TYPEHASH" function on the contract. ### Example `import { TRANSFER_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await TRANSFER_TYPEHASH({ contract, }); ` ##### Signature `` function TRANSFER_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the TRANSFER\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## add Prepares a transaction to call the "add" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { add } from "thirdweb/extensions/farcaster"; const transaction = add({ contract, keyType: ..., key: ..., metadataType: ..., metadata: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function add( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams) | { asyncParams: () => Promise<[AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "add" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams) | { asyncParams: () => Promise<[AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## addEvent Creates an event object for the Add event. ### Example `import { getContractEvents } from "thirdweb"; import { addEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ addEvent({ fid: ..., keyType: ..., key: ..., }) ], }); ` ##### Signature `function addEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "keyType"; readonly type: "uint32"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "metadata"; readonly type: "bytes" }, ]; readonly name: "Add"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "keyType"; readonly type: "uint32"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "metadata"; readonly type: "bytes" }, ]; readonly name: "Add"; readonly type: "event"; }>; ` The prepared event object. ## REGISTER\_TYPEHASH Calls the "REGISTER\_TYPEHASH" function on the contract. ### Example `import { REGISTER_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await REGISTER_TYPEHASH({ contract, }); ` ##### Signature `` function REGISTER_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the REGISTER\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## TRANSFER\_AND\_CHANGE\_RECOVERY\_TYPEHASH Calls the "TRANSFER\_AND\_CHANGE\_RECOVERY\_TYPEHASH" function on the contract. ### Example `import { TRANSFER_AND_CHANGE_RECOVERY_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await TRANSFER_AND_CHANGE_RECOVERY_TYPEHASH({ contract, }); ` ##### Signature `` function TRANSFER_AND_CHANGE_RECOVERY_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the TRANSFER\_AND\_CHANGE\_RECOVERY\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## addFor Prepares a transaction to call the "addFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { addFor } from "thirdweb/extensions/farcaster"; const transaction = addFor({ contract, fidOwner: ..., keyType: ..., key: ..., metadataType: ..., metadata: ..., deadline: ..., sig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function addFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< AddForParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "addFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< AddForParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## adminResetEvent Creates an event object for the AdminReset event. ### Example `import { getContractEvents } from "thirdweb"; import { adminResetEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ adminResetEvent({ fid: ..., key: ..., }) ], }); ` ##### Signature `function adminResetEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, ]; readonly name: "AdminReset"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, ]; readonly name: "AdminReset"; readonly type: "event"; }>; ` The prepared event object. ## addSignerFor Adds farcaster signer for a given user. Helpful if you want to cover the gas fee for a user. ### Example `import { addSignerFor } from "thirdweb/extensions/farcaster"; import { sendTransaction } from "thirdweb"; const transaction = addSignerFor({ client, appAccount, userAccount, signerPublicKey, }); await sendTransaction({ transaction, account }); ` ##### Signature `function addSignerFor( options: [AddSignerForParams](https://portal.thirdweb.com/references/typescript/v5/AddSignerForParams), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options The options for adding the signer. #### Type `let options: Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) & ( | { userAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { addSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); deadline: bigint; userAddress: Address } ) >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object to add the signer to the account. ## REMOVE\_TYPEHASH Calls the "REMOVE\_TYPEHASH" function on the contract. ### Example `import { REMOVE_TYPEHASH } from "thirdweb/extensions/farcaster"; const result = await REMOVE_TYPEHASH({ contract, }); ` ##### Signature `` function REMOVE_TYPEHASH( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the REMOVE\_TYPEHASH function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## adminResetEvent Creates an event object for the AdminReset event. ### Example `import { getContractEvents } from "thirdweb"; import { adminResetEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ adminResetEvent({ fid: ..., }) ], }); ` ##### Signature `function adminResetEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, ]; readonly name: "AdminReset"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, ]; readonly name: "AdminReset"; readonly type: "event"; }>; ` The prepared event object. ## addSigner Adds farcaster signer for the given account. ### Example `import { addSigner } from "thirdweb/extensions/farcaster"; import { sendTransaction } from "thirdweb"; const transaction = addSigner({ client, appAccount, signerPublicKey, }); await sendTransaction({ transaction, account }); ` ##### Signature `function addSigner( options: [AddSignerParams](https://portal.thirdweb.com/references/typescript/v5/AddSignerParams), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options The options for adding the signer. #### Type `let options: Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object to add the signer to the account. ## createEd25519Keypair Generates an Ed25519 keypair to be used as an account signer. ### Example `createSigner(); ` ##### Signature `function createEd25519Keypair(): Promise<[Ed25519Keypair](https://portal.thirdweb.com/references/typescript/v5/Ed25519Keypair)>; ` ### Returns ##### Return Type `let returnType: { privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); publicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` A promise resolving to the generated keypair. ## changeRecoveryAddressEvent Creates an event object for the ChangeRecoveryAddress event. ### Example `import { getContractEvents } from "thirdweb"; import { changeRecoveryAddressEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ changeRecoveryAddressEvent({ id: ..., recovery: ..., }) ], }); ` ##### Signature `function changeRecoveryAddressEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "recovery"; readonly type: "address"; }, ]; readonly name: "ChangeRecoveryAddress"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "recovery"; readonly type: "address"; }, ]; readonly name: "ChangeRecoveryAddress"; readonly type: "event"; }>; ` The prepared event object. ## custodyOf Calls the "custodyOf" function on the contract. ### Example `import { custodyOf } from "thirdweb/extensions/farcaster"; const result = await custodyOf({ contract, fid: ..., }); ` ##### Signature `function custodyOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CustodyOfParams](https://portal.thirdweb.com/references/typescript/v5/CustodyOfParams)>, ): Promise; ` ### Parameters ##### options The options for the custodyOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CustodyOfParams](https://portal.thirdweb.com/references/typescript/v5/CustodyOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## changeRecoveryAddress Prepares a transaction to call the "changeRecoveryAddress" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { changeRecoveryAddress } from "thirdweb/extensions/farcaster"; const transaction = changeRecoveryAddress({ contract, recovery: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function changeRecoveryAddress( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ChangeRecoveryAddressParams](https://portal.thirdweb.com/references/typescript/v5/ChangeRecoveryAddressParams) | { asyncParams: () => Promise<[ChangeRecoveryAddressParams](https://portal.thirdweb.com/references/typescript/v5/ChangeRecoveryAddressParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "changeRecoveryAddress" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ChangeRecoveryAddressParams](https://portal.thirdweb.com/references/typescript/v5/ChangeRecoveryAddressParams) | { asyncParams: () => Promise<[ChangeRecoveryAddressParams](https://portal.thirdweb.com/references/typescript/v5/ChangeRecoveryAddressParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeSignedKeyRequestMetadata Encodes the signed key request metadata into a hexadecimal string. This function takes in the request signer's address, the key request signature, the request Fid, and the deadline, and returns the encoded ABI parameters as a hexadecimal string. It's used to prepare the metadata for transactions involving signed key requests. ### Example `const encodedMetadata = encodeSignedKeyRequestMetadata({ requestSigner: "0x123...", keyRequestSignature: "0xabcd...", requestFid: 123456789n, deadline: 1657758061n, }); ` ##### Signature `` function encodeSignedKeyRequestMetadata(options: { deadline: bigint; keyRequestSignature: `0x${string}`; requestFid: bigint; requestSigner: string; }): `0x${string}`; `` ### Parameters ##### options The options for encoding the signed key request metadata. #### Type `` let options: { deadline: bigint; keyRequestSignature: `0x${string}`; requestFid: bigint; requestSigner: string; }; `` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The encoded ABI parameters as a hexadecimal string. ## gatewayFrozen Calls the "gatewayFrozen" function on the contract. ### Example `import { gatewayFrozen } from "thirdweb/extensions/farcaster"; const result = await gatewayFrozen({ contract, }); ` ##### Signature `function gatewayFrozen( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the gatewayFrozen function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## freezeIdGatewayEvent Creates an event object for the FreezeIdGateway event. ### Example `import { getContractEvents } from "thirdweb"; import { freezeIdGatewayEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [freezeIdGatewayEvent()], }); ` ##### Signature `function freezeIdGatewayEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "idGateway"; readonly type: "address" }, ]; readonly name: "FreezeIdGateway"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "idGateway"; readonly type: "address" }, ]; readonly name: "FreezeIdGateway"; readonly type: "event"; }>; ` The prepared event object. ## freezeKeyGatewayEvent Creates an event object for the FreezeKeyGateway event. ### Example `import { getContractEvents } from "thirdweb"; import { freezeKeyGatewayEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [freezeKeyGatewayEvent()], }); ` ##### Signature `function freezeKeyGatewayEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "keyGateway"; readonly type: "address" }, ]; readonly name: "FreezeKeyGateway"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "keyGateway"; readonly type: "address" }, ]; readonly name: "FreezeKeyGateway"; readonly type: "event"; }>; ` The prepared event object. ## gatewayFrozen Calls the "gatewayFrozen" function on the contract. ### Example `import { gatewayFrozen } from "thirdweb/extensions/farcaster"; const result = await gatewayFrozen({ contract, }); ` ##### Signature `function gatewayFrozen( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the gatewayFrozen function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## deprecationTimestamp Calls the "deprecationTimestamp" function on the contract. ### Example `import { deprecationTimestamp } from "thirdweb/extensions/farcaster"; const result = await deprecationTimestamp({ contract, }); ` ##### Signature `function deprecationTimestamp( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the deprecationTimestamp function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getAddData Prepares the data required for signing an Add message according to EIP-712. ### Example `const message: AddMessage = { owner: "0xYourAddress", keyType: 1, key: "0xYourPublicKey", metadataType: 1, metadata: "0xYourMetadata", nonce: BigInt("YourNonce"), deadline: BigInt("YourDeadline"), }; const data = getAddData(message); ` ##### Signature `function getAddData(message: [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage)): { domain: { readonly chainId: 10; readonly name: "Farcaster KeyGateway"; readonly verifyingContract: "0x00000000fC56947c7E7183f8Ca4B62398CaAdf0B"; readonly version: "1"; }; message: [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage); primaryType: "Add"; types: { readonly Add: readonly [ { readonly name: "owner"; readonly type: "address" }, { readonly name: "keyType"; readonly type: "uint32" }, { readonly name: "key"; readonly type: "bytes" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "metadata"; readonly type: "bytes" }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "deadline"; readonly type: "uint256" }, ]; }; }; ` ### Parameters ##### message The AddMessage object containing the message to be signed. #### Type `let message: { deadline: bigint; key: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); keyType: number; metadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); metadataType: number; nonce: bigint; owner: Address; }; ` ### Returns ##### Return Type `let returnType: { domain: { readonly chainId: 10; readonly name: "Farcaster KeyGateway"; readonly verifyingContract: "0x00000000fC56947c7E7183f8Ca4B62398CaAdf0B"; readonly version: "1"; }; message: [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage); primaryType: "Add"; types: { readonly Add: readonly [ { readonly name: "owner"; readonly type: "address" }, { readonly name: "keyType"; readonly type: "uint32" }, { readonly name: "key"; readonly type: "bytes" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "metadata"; readonly type: "bytes" }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "deadline"; readonly type: "uint256" }, ]; }; }; ` The data object structured according to EIP-712, ready for signing. ## getFid Retrieves the current fid for an account. ### Example `import { getFid } from "thirdweb/extensions/farcaster"; const price = await getFid({ client, address, }); ` ##### Signature `function getFid(options: [GetFidParams](https://portal.thirdweb.com/references/typescript/v5/GetFidParams)): Promise; ` ### Parameters ##### options Parameters to pass to the function. #### Type `let options: { address: Address; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the account's fid, if one exists, otherwise 0. ## getIdGateway Retrieves the IdGateway contract. ### Example `import { getIdGatway } from "thirdweb/extensions/farcaster"; const idGateway = await getIdGateway({ client, }); ` ##### Signature `function getIdGateway(options: [FarcasterContractOptions](https://portal.thirdweb.com/references/typescript/v5/FarcasterContractOptions)): Readonly; ` ### Parameters ##### options The thirdweb client and an optional custom chain. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Readonly; ` The IdGateway contract instance. ## getBundler Retrieves the Bundler contract. ### Example `import { getBundler } from "thirdweb/extensions/farcaster"; const bundler = await getBundler({ client, }); ` ##### Signature `function getBundler(options: [FarcasterContractOptions](https://portal.thirdweb.com/references/typescript/v5/FarcasterContractOptions)): Readonly; ` ### Parameters ##### options The thirdweb client and an optional custom chain. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Readonly; ` The Bundler contract instance. ## getKeyGateway Retrieves the KeyGateway contract. ### Example `import { getKeyGateway } from "thirdweb/extensions/farcaster"; const keyGateway = await getKeyGateway({ client, }); ` ##### Signature `function getKeyGateway(options: [FarcasterContractOptions](https://portal.thirdweb.com/references/typescript/v5/FarcasterContractOptions)): Readonly; ` ### Parameters ##### options The thirdweb client and an optional custom chain. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Readonly; ` The KeyGateway contract instance. ## getNonce Retrieves the current key gateway nonce for an account. ### Example `import { getNonce } from "thirdweb/extensions/farcaster"; const nonce = await getNonce({ client, address, }); ` ##### Signature `function getNonce(options: [GetNonceParams](https://portal.thirdweb.com/references/typescript/v5/GetNonceParams)): Promise; ` ### Parameters ##### options Parameters to pass to the function. #### Type `let options: { address: Address; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current nonce. ## getRegisterData Constructs the data required for signing a register message in the Farcaster ID Gateway. This includes the EIP-712 domain, types, and the message to be signed. ### Example `import { getRegisterData } from "thirdweb/extensions/farcaster"; const data = getRegisterData(message); ` ##### Signature `function getRegisterData(message: [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage)): { domain: { readonly chainId: 10; readonly name: "Farcaster IdGateway"; readonly verifyingContract: "0x00000000Fc25870C6eD6b6c7E41Fb078b7656f69"; readonly version: "1"; }; message: [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage); primaryType: "Register"; types: { readonly Register: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "recovery"; readonly type: "address" }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "deadline"; readonly type: "uint256" }, ]; }; }; ` ### Parameters ##### message The register message containing the necessary information for the signature. #### Type `let message: { deadline: bigint; nonce: bigint; recovery: Address; to: Address; }; ` ### Returns ##### Return Type `let returnType: { domain: { readonly chainId: 10; readonly name: "Farcaster IdGateway"; readonly verifyingContract: "0x00000000Fc25870C6eD6b6c7E41Fb078b7656f69"; readonly version: "1"; }; message: [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage); primaryType: "Register"; types: { readonly Register: readonly [ { readonly name: "to"; readonly type: "address" }, { readonly name: "recovery"; readonly type: "address" }, { readonly name: "nonce"; readonly type: "uint256" }, { readonly name: "deadline"; readonly type: "uint256" }, ]; }; }; ` An object containing the EIP-712 domain, types, and the message, ready to be signed. ## getRegistrationPrice Retrieves the current cost to register a Farcaster fid in wei. ### Example `import { getRegistrationPrice } from "thirdweb/extensions/farcaster"; const price = await getRegistrationPrice({ client, }); ` ##### Signature `function getRegistrationPrice( options: [GetRegistrationPriceParams](https://portal.thirdweb.com/references/typescript/v5/GetRegistrationPriceParams), ): Promise; ` ### Parameters ##### options An object containing a client to use to fetch the price and the amount of extra storage to include in the returned price. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number | string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current cost of a Farcaster fid in wei. ## getKeyRequestData Prepares the data required for signing a key request using EIP-712 typed data signing. This includes the domain, types, primary type, and the message to be signed. ### Example `const message = { requestFid: 123456789n, key: "0x04bfc...", deadline: 1657758061n, }; const eip712Data = getKeyRequestData(message); ` ##### Signature `function getKeyRequestData(message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage)): { domain: { readonly chainId: 10; readonly name: "Farcaster SignedKeyRequestValidator"; readonly verifyingContract: "0x00000000FC700472606ED4fA22623Acf62c60553"; readonly version: "1"; }; message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage); primaryType: "SignedKeyRequest"; types: { readonly SignedKeyRequest: Array<{ name: string; type: string }>; }; }; ` ### Parameters ##### message The message to be signed, containing the request FID, key, and deadline. #### Type `let message: { deadline: bigint; key: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); requestFid: bigint }; ` ### Returns ##### Return Type `let returnType: { domain: { readonly chainId: 10; readonly name: "Farcaster SignedKeyRequestValidator"; readonly verifyingContract: "0x00000000FC700472606ED4fA22623Acf62c60553"; readonly version: "1"; }; message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage); primaryType: "SignedKeyRequest"; types: { readonly SignedKeyRequest: Array<{ name: string; type: string }>; }; }; ` An object containing the domain, types, primary type, and the message for EIP-712 signing. ## getSignedKeyRequestMetadata Generates the signed key request metadata to add a signer to an account. This function can either sign a new key request using an account object or use an existing key request signature. It prepares the metadata necessary for transactions involving signed key requests. ### Example `import { getSignedKeyRequestMetadata } from "thirdweb/extensions/farcaster"; // Using an existing signature const signedMetadata = await getSignedKeyRequestMetadata({ keyRequestSignature: "0xabcd...", accountAddress: "0x123...", message: { requestFid: 123456789n, deadline: 1657758061n, }, }); // Signing a new key request const signedMetadata = await getSignedKeyRequestMetadata({ account, message: { requestFid: 123456789n, deadline: 1657758061n, }, }); ` ##### Signature `` function getSignedKeyRequestMetadata( options: [SignedKeyRequestMetadataOptions](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMetadataOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for signing the key request or using an existing signature. #### Type `let options: Prettify< { message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage) } & ( | { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { accountAddress: Address; keyRequestSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) } ) >; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the hexadecimal string of the encoded ABI parameters. ## getStoragePrice Retrieves the current cost to register a Farcaster fid in wei. ### Example `import { getStoragePrice } from "thirdweb/extensions/farcaster"; const price = await getStoragePrice({ client, }); ` ##### Signature `function getStoragePrice( options: [GetStoragePriceParams](https://portal.thirdweb.com/references/typescript/v5/GetStoragePriceParams), ): Promise; ` ### Parameters ##### options An object containing a client to use to fetch the price and the amount of extra storage to include in the returned price. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; units?: bigint | number | string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current cost of a Farcaster fid in USD. ## batchRent Prepares a transaction to call the "batchRent" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { batchRent } from "thirdweb/extensions/farcaster"; const transaction = batchRent({ contract, fids: ..., units: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function batchRent( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< BatchRentParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "batchRent" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< BatchRentParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getStorageRegistry Retrieves the StorageRegistry contract. ### Example `import { getStorageRegistry } from "thirdweb/extensions/farcaster"; const storageRegistry = await getStorageRegistry({ client, }); ` ##### Signature `function getStorageRegistry( options: [FarcasterContractOptions](https://portal.thirdweb.com/references/typescript/v5/FarcasterContractOptions), ): Readonly; ` ### Parameters ##### options The thirdweb client and an optional custom chain. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Readonly; ` The StorageRegistry contract instance. ## idGateway Calls the "idGateway" function on the contract. ### Example `import { idGateway } from "thirdweb/extensions/farcaster"; const result = await idGateway({ contract, }); ` ##### Signature `function idGateway(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the idGateway function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## idCounter Calls the "idCounter" function on the contract. ### Example `import { idCounter } from "thirdweb/extensions/farcaster"; const result = await idCounter({ contract, }); ` ##### Signature `function idCounter(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the idCounter function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getUsdRegistrationPrice Retrieves the current cost to register a Farcaster fid in USD. ### Example `import { getUsdRegistrationPrice } from "thirdweb/extensions/farcaster"; const price = await getUsdRegistrationPrice({ client, }); ` ##### Signature `function getUsdRegistrationPrice( options: [GetUsdRegistrationPriceParams](https://portal.thirdweb.com/references/typescript/v5/GetUsdRegistrationPriceParams), ): Promise; ` ### Parameters ##### options An object containing a client to use to fetch the price and the amount of extra storage to include in the returned price. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number | string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current cost of a Farcaster fid in USD. ## idGateway Calls the "idGateway" function on the contract. ### Example `import { idGateway } from "thirdweb/extensions/farcaster"; const result = await idGateway({ contract, }); ` ##### Signature `function idGateway(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the idGateway function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## idOf Calls the "idOf" function on the contract. ### Example `import { idOf } from "thirdweb/extensions/farcaster"; const result = await idOf({ contract, owner: ..., }); ` ##### Signature `function idOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IdOfParams](https://portal.thirdweb.com/references/typescript/v5/IdOfParams)>, ): Promise; ` ### Parameters ##### options The options for the idOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IdOfParams](https://portal.thirdweb.com/references/typescript/v5/IdOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getUsdStoragePrice Retrieves the current cost to register a Farcaster fid in USD. ### Example `import { getUsdStoragePrice } from "thirdweb/extensions/farcaster"; const price = await getUsdStoragePrice({ client, }); ` ##### Signature `function getUsdStoragePrice( options: [GetUsdStoragePriceParams](https://portal.thirdweb.com/references/typescript/v5/GetUsdStoragePriceParams), ): Promise; ` ### Parameters ##### options An object containing a client to use to fetch the price and the amount of extra storage to include in the returned price. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; units?: bigint | number | string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the current cost of a Farcaster fid in USD. ## getIdRegistry Retrieves the IdRegistry contract. ### Example `import { getIdRegistry } from "thirdweb/extensions/farcaster"; const idRegistry = await getIdRegistry({ client, }); ` ##### Signature `function getIdRegistry(options: [FarcasterContractOptions](https://portal.thirdweb.com/references/typescript/v5/FarcasterContractOptions)): Readonly; ` ### Parameters ##### options The thirdweb client and an optional custom chain. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Readonly; ` The IdRegistry contract instance. ## keyDataOf Calls the "keyDataOf" function on the contract. ### Example `import { keyDataOf } from "thirdweb/extensions/farcaster"; const result = await keyDataOf({ contract, fid: ..., key: ..., }); ` ##### Signature `function keyDataOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the keyDataOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## idRegistry Calls the "idRegistry" function on the contract. ### Example `import { idRegistry } from "thirdweb/extensions/farcaster"; const result = await idRegistry({ contract, }); ` ##### Signature `function idRegistry(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the idRegistry function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## keyGateway Calls the "keyGateway" function on the contract. ### Example `import { keyGateway } from "thirdweb/extensions/farcaster"; const result = await keyGateway({ contract, }); ` ##### Signature `function keyGateway(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the keyGateway function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## keyRegistry Calls the "keyRegistry" function on the contract. ### Example `import { keyRegistry } from "thirdweb/extensions/farcaster"; const result = await keyRegistry({ contract, }); ` ##### Signature `function keyRegistry( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the keyRegistry function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## keyAt Calls the "keyAt" function on the contract. ### Example `import { keyAt } from "thirdweb/extensions/farcaster"; const result = await keyAt({ contract, fid: ..., state: ..., index: ..., }); ` ##### Signature `` function keyAt( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the keyAt function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## keyGateway Calls the "keyGateway" function on the contract. ### Example `import { keyGateway } from "thirdweb/extensions/farcaster"; const result = await keyGateway({ contract, }); ` ##### Signature `function keyGateway(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the keyGateway function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## keysOf Calls the "keysOf" function on the contract. ### Example `import { keysOf } from "thirdweb/extensions/farcaster"; const result = await keysOf({ contract, fid: ..., state: ..., }); ` ##### Signature `` function keysOf(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise> `` ### Parameters ##### options The options for the keysOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `` let returnType: Promise> `` The parsed result of the function call. ## nonces Calls the "nonces" function on the contract. ### Example `import { nonces } from "thirdweb/extensions/farcaster"; const result = await nonces({ contract, account: ..., }); ` ##### Signature `function nonces( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NoncesParams](https://portal.thirdweb.com/references/typescript/v5/NoncesParams)>, ): Promise; ` ### Parameters ##### options The options for the nonces function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NoncesParams](https://portal.thirdweb.com/references/typescript/v5/NoncesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxUnits Calls the "maxUnits" function on the contract. ### Example `import { maxUnits } from "thirdweb/extensions/farcaster"; const result = await maxUnits({ contract, }); ` ##### Signature `function maxUnits(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the maxUnits function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## maxKeysPerFid Calls the "maxKeysPerFid" function on the contract. ### Example `import { maxKeysPerFid } from "thirdweb/extensions/farcaster"; const result = await maxKeysPerFid({ contract, }); ` ##### Signature `function maxKeysPerFid( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the maxKeysPerFid function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## price Calls the "price" function on the contract. ### Example `import { price } from "thirdweb/extensions/farcaster"; const result = await price({ contract, extraStorage: ..., }); ` ##### Signature `function price( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>, ): Promise; ` ### Parameters ##### options The options for the price function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## price Calls the "price" function on the contract. ### Example `import { price } from "thirdweb/extensions/farcaster"; const result = await price({ contract, units: ..., }); ` ##### Signature `function price( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>, ): Promise; ` ### Parameters ##### options The options for the price function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## price Calls the "price" function on the contract. ### Example `import { price } from "thirdweb/extensions/farcaster"; const result = await price({ contract, extraStorage: ..., }); ` ##### Signature `function price( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>, ): Promise; ` ### Parameters ##### options The options for the price function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PriceParams](https://portal.thirdweb.com/references/typescript/v5/PriceParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## recoverEvent Creates an event object for the Recover event. ### Example `import { getContractEvents } from "thirdweb"; import { recoverEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ recoverEvent({ from: ..., to: ..., id: ..., }) ], }); ` ##### Signature `function recoverEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, ]; readonly name: "Recover"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, ]; readonly name: "Recover"; readonly type: "event"; }>; ` The prepared event object. ## idRegistry Calls the "idRegistry" function on the contract. ### Example `import { idRegistry } from "thirdweb/extensions/farcaster"; const result = await idRegistry({ contract, }); ` ##### Signature `function idRegistry(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the idRegistry function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## recover Prepares a transaction to call the "recover" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { recover } from "thirdweb/extensions/farcaster"; const transaction = recover({ contract, from: ..., to: ..., deadline: ..., sig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function recover( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RecoverParams](https://portal.thirdweb.com/references/typescript/v5/RecoverParams) | { asyncParams: () => Promise<[RecoverParams](https://portal.thirdweb.com/references/typescript/v5/RecoverParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "recover" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RecoverParams](https://portal.thirdweb.com/references/typescript/v5/RecoverParams) | { asyncParams: () => Promise<[RecoverParams](https://portal.thirdweb.com/references/typescript/v5/RecoverParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## register Prepares a transaction to call the "register" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { register } from "thirdweb/extensions/farcaster"; const transaction = register({ contract, recovery: ..., extraStorage: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function register( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams) | { asyncParams: () => Promise<[RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "register" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams) | { asyncParams: () => Promise<[RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## register Prepares a transaction to call the "register" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { register } from "thirdweb/extensions/farcaster"; const transaction = register({ contract, registerParams: ..., signerParams: ..., extraStorage: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function register( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams) | { asyncParams: () => Promise<[RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "register" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams) | { asyncParams: () => Promise<[RegisterParams](https://portal.thirdweb.com/references/typescript/v5/RegisterParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## recoverFor Prepares a transaction to call the "recoverFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { recoverFor } from "thirdweb/extensions/farcaster"; const transaction = recoverFor({ contract, from: ..., to: ..., recoveryDeadline: ..., recoverySig: ..., toDeadline: ..., toSig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function recoverFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RecoverForParams](https://portal.thirdweb.com/references/typescript/v5/RecoverForParams) | { asyncParams: () => Promise<[RecoverForParams](https://portal.thirdweb.com/references/typescript/v5/RecoverForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "recoverFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RecoverForParams](https://portal.thirdweb.com/references/typescript/v5/RecoverForParams) | { asyncParams: () => Promise<[RecoverForParams](https://portal.thirdweb.com/references/typescript/v5/RecoverForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## recoveryOf Calls the "recoveryOf" function on the contract. ### Example `import { recoveryOf } from "thirdweb/extensions/farcaster"; const result = await recoveryOf({ contract, fid: ..., }); ` ##### Signature `function recoveryOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RecoveryOfParams](https://portal.thirdweb.com/references/typescript/v5/RecoveryOfParams)>, ): Promise; ` ### Parameters ##### options The options for the recoveryOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RecoveryOfParams](https://portal.thirdweb.com/references/typescript/v5/RecoveryOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## registerFid Registers a Farcaster fid for the given wallet. ### Example `import { registerFid } from "thirdweb/extensions/farcaster"; import { sendTransaction } from "thirdweb"; const transaction = registerFid({ client, recoveryAddress, }); await sendTransaction({ transaction, account }); ` ##### Signature `function registerFid( options: [RegisterFidParams](https://portal.thirdweb.com/references/typescript/v5/RegisterFidParams), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options The options for registering an account. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | string | number; recoveryAddress: Address; }; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object to register the account. ## registerFidAndSigner Registers a Farcaster fid and signer for the given wallet using the provided app account. ### Example `import { registerFidAndSigner } from "thirdweb/extensions/farcaster"; import { sendTransaction } from "thirdweb"; const transaction = registerFidAndSigner({ client, userAccount, appAccount, recoveryAddress, signerPublicKey, }); await sendTransaction({ transaction, account }); ` ##### Signature `function registerFidAndSigner( options: [RegisterFidAndSignerParams](https://portal.thirdweb.com/references/typescript/v5/RegisterFidAndSignerParams), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options The options for registering an account. #### Type `let options: Prettify< { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; extraStorage?: bigint | number; recoveryAddress: Address; signerPublicKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } & ( | { userAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { addSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); deadline: bigint; registerSignature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); userAddress: Address; } ) & ( | { appAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account) } | { appAccountAddress: Address; deadline: bigint; signedKeyRequestMetadata: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); } ) >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object to register the account. ## registerEvent Creates an event object for the Register event. ### Example `import { getContractEvents } from "thirdweb"; import { registerEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ registerEvent({ to: ..., id: ..., }) ], }); ` ##### Signature `function registerEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, { readonly name: "recovery"; readonly type: "address" }, ]; readonly name: "Register"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly indexed: true; readonly name: "id"; readonly type: "uint256"; }, { readonly name: "recovery"; readonly type: "address" }, ]; readonly name: "Register"; readonly type: "event"; }>; ` The prepared event object. ## registerFor Prepares a transaction to call the "registerFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { registerFor } from "thirdweb/extensions/farcaster"; const transaction = registerFor({ contract, to: ..., recovery: ..., deadline: ..., sig: ..., extraStorage: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function registerFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RegisterForParams](https://portal.thirdweb.com/references/typescript/v5/RegisterForParams) | { asyncParams: () => Promise<[RegisterForParams](https://portal.thirdweb.com/references/typescript/v5/RegisterForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "registerFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RegisterForParams](https://portal.thirdweb.com/references/typescript/v5/RegisterForParams) | { asyncParams: () => Promise<[RegisterForParams](https://portal.thirdweb.com/references/typescript/v5/RegisterForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## remove Prepares a transaction to call the "remove" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { remove } from "thirdweb/extensions/farcaster"; const transaction = remove({ contract, key: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function remove( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams) | { asyncParams: () => Promise<[RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "remove" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams) | { asyncParams: () => Promise<[RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## removeEvent Creates an event object for the Remove event. ### Example `import { getContractEvents } from "thirdweb"; import { removeEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ removeEvent({ fid: ..., key: ..., }) ], }); ` ##### Signature `function removeEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, ]; readonly name: "Remove"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "fid"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "key"; readonly type: "bytes"; }, { readonly name: "keyBytes"; readonly type: "bytes" }, ]; readonly name: "Remove"; readonly type: "event"; }>; ` The prepared event object. ## rent Prepares a transaction to call the "rent" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { rent } from "thirdweb/extensions/farcaster"; const transaction = rent({ contract, fid: ..., units: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function rent( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< RentParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "rent" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< RentParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## removeFor Prepares a transaction to call the "removeFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { removeFor } from "thirdweb/extensions/farcaster"; const transaction = removeFor({ contract, fidOwner: ..., key: ..., deadline: ..., sig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function removeFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< RemoveForParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "removeFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< RemoveForParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## rentStorage Rent storage for the provided farcaster fid. ### Example `import { rentStorage } from "thirdweb/extensions/farcaster"; import { sendTransaction } from "thirdweb"; const transaction = rentStorage({ client, fid, units, }); await sendTransaction({ transaction, account }); ` ##### Signature `function rentStorage( options: [RentStorageParams](https://portal.thirdweb.com/references/typescript/v5/RentStorageParams), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)>; ` ### Parameters ##### options The options for calling the `rentStorage` function. #### Type `let options: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); disableCache?: boolean; fid: bigint | number | string; units?: bigint | number | string; }; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< [], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object to rent the storage. ## setIdCounterEvent Creates an event object for the SetIdCounter event. ### Example `import { getContractEvents } from "thirdweb"; import { setIdCounterEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setIdCounterEvent()], }); ` ##### Signature `function setIdCounterEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldCounter"; readonly type: "uint256" }, { readonly name: "newCounter"; readonly type: "uint256" }, ]; readonly name: "SetIdCounter"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldCounter"; readonly type: "uint256" }, { readonly name: "newCounter"; readonly type: "uint256" }, ]; readonly name: "SetIdCounter"; readonly type: "event"; }>; ` The prepared event object. ## setIdRegistryEvent Creates an event object for the SetIdRegistry event. ### Example `import { getContractEvents } from "thirdweb"; import { setIdRegistryEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setIdRegistryEvent()], }); ` ##### Signature `function setIdRegistryEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldIdRegistry"; readonly type: "address" }, { readonly name: "newIdRegistry"; readonly type: "address" }, ]; readonly name: "SetIdRegistry"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldIdRegistry"; readonly type: "address" }, { readonly name: "newIdRegistry"; readonly type: "address" }, ]; readonly name: "SetIdRegistry"; readonly type: "event"; }>; ` The prepared event object. ## setIdGatewayEvent Creates an event object for the SetIdGateway event. ### Example `import { getContractEvents } from "thirdweb"; import { setIdGatewayEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setIdGatewayEvent()], }); ` ##### Signature `function setIdGatewayEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldIdGateway"; readonly type: "address" }, { readonly name: "newIdGateway"; readonly type: "address" }, ]; readonly name: "SetIdGateway"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldIdGateway"; readonly type: "address" }, { readonly name: "newIdGateway"; readonly type: "address" }, ]; readonly name: "SetIdGateway"; readonly type: "event"; }>; ` The prepared event object. ## setKeyGatewayEvent Creates an event object for the SetKeyGateway event. ### Example `import { getContractEvents } from "thirdweb"; import { setKeyGatewayEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setKeyGatewayEvent()], }); ` ##### Signature `function setKeyGatewayEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldKeyGateway"; readonly type: "address" }, { readonly name: "newKeyGateway"; readonly type: "address" }, ]; readonly name: "SetKeyGateway"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldKeyGateway"; readonly type: "address" }, { readonly name: "newKeyGateway"; readonly type: "address" }, ]; readonly name: "SetKeyGateway"; readonly type: "event"; }>; ` The prepared event object. ## rentedUnits Calls the "rentedUnits" function on the contract. ### Example `import { rentedUnits } from "thirdweb/extensions/farcaster"; const result = await rentedUnits({ contract, }); ` ##### Signature `function rentedUnits( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the rentedUnits function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setValidatorEvent Creates an event object for the SetValidator event. ### Example `import { getContractEvents } from "thirdweb"; import { setValidatorEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setValidatorEvent()], }); ` ##### Signature `function setValidatorEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "keyType"; readonly type: "uint32" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "oldValidator"; readonly type: "address" }, { readonly name: "newValidator"; readonly type: "address" }, ]; readonly name: "SetValidator"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "keyType"; readonly type: "uint32" }, { readonly name: "metadataType"; readonly type: "uint8" }, { readonly name: "oldValidator"; readonly type: "address" }, { readonly name: "newValidator"; readonly type: "address" }, ]; readonly name: "SetValidator"; readonly type: "event"; }>; ` The prepared event object. ## setStorageRegistryEvent Creates an event object for the SetStorageRegistry event. ### Example `import { getContractEvents } from "thirdweb"; import { setStorageRegistryEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setStorageRegistryEvent()], }); ` ##### Signature `function setStorageRegistryEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldStorageRegistry"; readonly type: "address" }, { readonly name: "newStorageRegistry"; readonly type: "address" }, ]; readonly name: "SetStorageRegistry"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldStorageRegistry"; readonly type: "address" }, { readonly name: "newStorageRegistry"; readonly type: "address" }, ]; readonly name: "SetStorageRegistry"; readonly type: "event"; }>; ` The prepared event object. ## signAdd Signs an Add message using the account's signTypedData method. ### Example `const signedMessage = await signAdd({ account: yourAccount, message: yourAddMessage, }); ` ##### Signature `` function signAdd(options: [SignAddOptions](https://portal.thirdweb.com/references/typescript/v5/SignAddOptions)): Promise<`0x${string}`>; `` ### Parameters ##### options The options for signing the Add message. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [AddMessage](https://portal.thirdweb.com/references/typescript/v5/AddMessage) }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the signature of the Add message. ## signRegister Signs the register message for Farcaster ID Gateway. ### Example `const signature = await signRegister({ account, message }); ` ##### Signature `` function signRegister( options: [SignRegisterOptions](https://portal.thirdweb.com/references/typescript/v5/SignRegisterOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The signing options. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [RegisterMessage](https://portal.thirdweb.com/references/typescript/v5/RegisterMessage) }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the signature. ## setMaxKeysPerFidEvent Creates an event object for the SetMaxKeysPerFid event. ### Example `import { getContractEvents } from "thirdweb"; import { setMaxKeysPerFidEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [setMaxKeysPerFidEvent()], }); ` ##### Signature `function setMaxKeysPerFidEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldMax"; readonly type: "uint256" }, { readonly name: "newMax"; readonly type: "uint256" }, ]; readonly name: "SetMaxKeysPerFid"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "oldMax"; readonly type: "uint256" }, { readonly name: "newMax"; readonly type: "uint256" }, ]; readonly name: "SetMaxKeysPerFid"; readonly type: "event"; }>; ` The prepared event object. ## storageRegistry Calls the "storageRegistry" function on the contract. ### Example `import { storageRegistry } from "thirdweb/extensions/farcaster"; const result = await storageRegistry({ contract, }); ` ##### Signature `function storageRegistry( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the storageRegistry function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## transferAndChangeRecovery Prepares a transaction to call the "transferAndChangeRecovery" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { transferAndChangeRecovery } from "thirdweb/extensions/farcaster"; const transaction = transferAndChangeRecovery({ contract, to: ..., recovery: ..., deadline: ..., sig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function transferAndChangeRecovery( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferAndChangeRecoveryParams](https://portal.thirdweb.com/references/typescript/v5/TransferAndChangeRecoveryParams) | { asyncParams: () => Promise<[TransferAndChangeRecoveryParams](https://portal.thirdweb.com/references/typescript/v5/TransferAndChangeRecoveryParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "transferAndChangeRecovery" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferAndChangeRecoveryParams](https://portal.thirdweb.com/references/typescript/v5/TransferAndChangeRecoveryParams) | { asyncParams: () => Promise<[TransferAndChangeRecoveryParams](https://portal.thirdweb.com/references/typescript/v5/TransferAndChangeRecoveryParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## totalKeys Calls the "totalKeys" function on the contract. ### Example `import { totalKeys } from "thirdweb/extensions/farcaster"; const result = await totalKeys({ contract, fid: ..., state: ..., }); ` ##### Signature `function totalKeys( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalKeys function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## transfer Prepares a transaction to call the "transfer" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { transfer } from "thirdweb/extensions/farcaster"; const transaction = transfer({ contract, to: ..., deadline: ..., sig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function transfer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams) | { asyncParams: () => Promise<[TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "transfer" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams) | { asyncParams: () => Promise<[TransferParams](https://portal.thirdweb.com/references/typescript/v5/TransferParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## signKeyRequest Signs a key request message using EIP-712 typed data signing. This function prepares the data for signing, signs it with the provided account, and returns the signature. ### Example `const message = { requestFid: 123456789n, key: "0x04bfc...", deadline: 1657758061n, }; const signature = signKeyRequest({ account: signerAccount, message }); ` ##### Signature `` function signKeyRequest( options: [SignKeyRequestOptions](https://portal.thirdweb.com/references/typescript/v5/SignKeyRequestOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for signing the key request, including the account and the message. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: [SignedKeyRequestMessage](https://portal.thirdweb.com/references/typescript/v5/SignedKeyRequestMessage) }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A promise that resolves to the signature of the key request. ## unitPrice Calls the "unitPrice" function on the contract. ### Example `import { unitPrice } from "thirdweb/extensions/farcaster"; const result = await unitPrice({ contract, }); ` ##### Signature `function unitPrice(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the unitPrice function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## transferEvent Creates an event object for the Transfer event. ### Example `import { getContractEvents } from "thirdweb"; import { transferEvent } from "thirdweb/extensions/farcaster"; const events = await getContractEvents({ contract, events: [ transferEvent({ from: ..., to: ..., }) ], }); ` ##### Signature `function transferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "id"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "from"; readonly type: "address"; }, { readonly indexed: true; readonly name: "to"; readonly type: "address"; }, { readonly name: "id"; readonly type: "uint256" }, ]; readonly name: "Transfer"; readonly type: "event"; }>; ` The prepared event object. ## transferFor Prepares a transaction to call the "transferFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { transferFor } from "thirdweb/extensions/farcaster"; const transaction = transferFor({ contract, from: ..., to: ..., fromDeadline: ..., fromSig: ..., toDeadline: ..., toSig: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function transferFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferForParams](https://portal.thirdweb.com/references/typescript/v5/TransferForParams) | { asyncParams: () => Promise<[TransferForParams](https://portal.thirdweb.com/references/typescript/v5/TransferForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "transferFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferForParams](https://portal.thirdweb.com/references/typescript/v5/TransferForParams) | { asyncParams: () => Promise<[TransferForParams](https://portal.thirdweb.com/references/typescript/v5/TransferForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## verifyFidSignature Calls the "verifyFidSignature" function on the contract. ### Example `import { verifyFidSignature } from "thirdweb/extensions/farcaster"; const result = await verifyFidSignature({ contract, custodyAddress: ..., fid: ..., digest: ..., sig: ..., }); ` ##### Signature `function verifyFidSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[VerifyFidSignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyFidSignatureParams)>, ): Promise; ` ### Parameters ##### options The options for the verifyFidSignature function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[VerifyFidSignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyFidSignatureParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## formatNumber Round up a number to a certain decimal place ### Example `import { formatNumber } from "thirdweb/utils"; const value = formatNumber(12.1214141, 1); // 12.1 ` ##### Signature `function formatNumber(value: number, decimalPlaces: number): number; ` ### Parameters ##### value #### Type `let value: number; ` ##### decimalPlaces #### Type `let decimalPlaces: number; ` ### Returns ##### Return Type `let returnType: number; ` ## fetchPublishedContract Fetches the published contract based on the provided options. ### Example `const publishedContract = await fetchPublishedContract({ publisherAddress: "0x1234", contractName: "MyContract", version: "1.0.0", client: client, }); ` ##### Signature `` function fetchPublishedContract( options: FetchPublishedContractOptions, ): Promise<{ bytecodeHash: `0x${string}`; contractId: string; implementation: string; publishMetadataUri: string; publishTimestamp: bigint; }>; `` ### Parameters ##### options The options for fetching the published contract. #### Type `let options: FetchPublishedContractOptions; ` ### Returns ##### Return Type `` let returnType: Promise<{ bytecodeHash: `0x${string}`; contractId: string; implementation: string; publishMetadataUri: string; publishTimestamp: bigint; }>; `` The published contract. ## usdUnitPrice Calls the "usdUnitPrice" function on the contract. ### Example `import { usdUnitPrice } from "thirdweb/extensions/farcaster"; const result = await usdUnitPrice({ contract, }); ` ##### Signature `function usdUnitPrice( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the usdUnitPrice function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## fromGwei Converts the specified number from gwei to wei. ### Example `import { fromGwei } from "thirdweb/utils"; fromGwei("1"); // 1000000000n ` ##### Signature `function fromGwei(gwei: string): bigint; ` ### Parameters ##### gwei The number of gwei to convert. #### Type `let gwei: string; ` ### Returns ##### Return Type `let returnType: bigint; ` The converted value in wei. ## fromBytes Converts a Uint8Array to the specified type. ### Example `import { fromBytes } from "thirdweb/utils"; const bytes = new Uint8Array([1, 164]); const number = fromBytes(bytes, "number"); console.log(number); // 420 ` ##### Signature `function fromBytes( bytes: Uint8Array, toOrOpts: [FromBytesParameters](https://portal.thirdweb.com/references/typescript/v5/FromBytesParameters), ): [FromBytesReturnType](https://portal.thirdweb.com/references/typescript/v5/FromBytesReturnType); ` ### Parameters ##### bytes The Uint8Array to convert. #### Type `let bytes: Uint8Array; ` ##### toOrOpts The target type or conversion options. #### Type `let toOrOpts: [FromBytesParameters](https://portal.thirdweb.com/references/typescript/v5/FromBytesParameters); ` ### Returns ##### Return Type `let returnType: [FromBytesReturnType](https://portal.thirdweb.com/references/typescript/v5/FromBytesReturnType); ` The converted value of the specified type. ## fromHex Converts a hexadecimal string to the specified type. ### Example `import { fromHex } from "thirdweb/utils"; const string = fromHex("0x48656c6c6f2c20776f726c6421", "string"); console.log(string); // "Hello, world!" ` ##### Signature `` function fromHex( hex: `0x${string}`, toOrOpts: [FromHexParameters](https://portal.thirdweb.com/references/typescript/v5/FromHexParameters), ): [FromHexReturnType](https://portal.thirdweb.com/references/typescript/v5/FromHexReturnType); `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### toOrOpts The target type or conversion options. #### Type `let toOrOpts: [FromHexParameters](https://portal.thirdweb.com/references/typescript/v5/FromHexParameters); ` ### Returns ##### Return Type `let returnType: [FromHexReturnType](https://portal.thirdweb.com/references/typescript/v5/FromHexReturnType); ` The converted value of the specified type. ## getActiveWalletConnectSessions Retrieves all active WalletConnect sessions. ### Example `import { getActiveWalletConnectSessions } from "thirdweb/wallets"; const sessions = await getActiveWalletConnectSessions(); ` ##### Signature `function getActiveWalletConnectSessions(): Promise< Array<[WalletConnectSession](https://portal.thirdweb.com/references/typescript/v5/WalletConnectSession)> >; ` ### Returns ##### Return Type `let returnType: { origin?: string; topic: string }; ` All active WalletConnect sessions. ## getApprovalForTransaction When dealing with transactions that involve ERC20 tokens (Airdropping ERC20, buy NFTs with ERC20, etc.) you often have to do a pre-check to see if the targeted contract has the sufficient allowance to "take" the ERC20 tokens from the caller's wallet. This extension is a handy method that checks for the allowance and requests to approve for more if current allowance is insufficient ### Example `import { getApprovalForTransaction } from "thirdweb/extensions/erc20"; import { sendAndConfirmTransaction } from "thirdweb"; async function buyNFT() { const buyTransaction = ... // could be a marketplacev3's buyFromListing // Check if you need to approve spending for the involved ERC20 contract const approveTx = await getApprovalForTransaction({ transaction: buyTransaction, account, // the connected account }); if (approveTx) { await sendAndConfirmTransaction({ transaction: approveTx, account, }) } // Once approved, you can finally perform the buy transaction await sendAndConfirmTransaction({ transaction: buyTransaction, account, }); } ` ##### Signature `function getApprovalForTransaction( options: [GetApprovalForTransactionParams](https://portal.thirdweb.com/references/typescript/v5/GetApprovalForTransactionParams), ): Promise; ` ### Parameters ##### options GetApprovalForTransactionParams #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` a PreparedTransaction ## generateAccount Generates a new account with a random private key. ### Example `import { generateAccount } from "thirdweb/wallets"; const account = await generateAccount({ client }); ` ##### Signature `function generateAccount( options: [GenerateAccountOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateAccountOptions), ): Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; ` ### Parameters ##### options The options for generating the account. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` A Thirdweb account. ## getBuyWithCryptoHistory Gets the History of purchases for a given wallet address ### Example `import { createThirdwebClient } from "thirdweb"; import { BuyWithCryptoHistoryData } from "thirdweb/pay"; const client = createThirdwebClient({ clientId: "..." }); const walletAddress = "0x..."; const params = { client, walletAddress, }; // grabs the history of purchase transactions for the wallet address const status = await getBuyWithCryptoHistory(params); ` ##### Signature `function getBuyWithCryptoHistory( params: [BuyWithCryptoHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryParams), ): Promise<[BuyWithCryptoHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData)>; ` ### Parameters ##### params Object of type [BuyWithCryptoHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ### Returns ##### Return Type `let returnType: { hasNextPage: boolean; page: Array<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)>; }; ` Object of type [BuyWithCryptoHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData) ## getAddress Retrieves the address after performing validation and checksumming. ### Example `import { getAddress } from "thirdweb/utils"; getAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"); //=> '0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed' ` ##### Signature `` function getAddress(address: string): `0x${string}`; `` ### Parameters ##### address The address to be validated and checksummed. #### Type `let address: string; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The validated and checksummed address. ## getBuyWithCryptoStatus Gets the status of a buy with crypto transaction ### Example `import { sendTransaction } from "thirdweb"; import { getBuyWithCryptoStatus, getBuyWithCryptoQuote } from "thirdweb/pay"; // get a quote between two tokens const quote = await getBuyWithCryptoQuote(quoteParams); // if approval is required, send the approval transaction if (quote.approval) { const txResult = await sendTransaction({ transaction: quote.approval, account: account, // account from connected wallet }); await waitForReceipt(txResult); } // send the quoted transaction const swapTxResult = await sendTransaction({ transaction: quote.transactionRequest, account: account, // account from connected wallet }); await waitForReceipt(swapTxResult); // keep polling the status of the quoted transaction until it returns a success or failure status const status = await getBuyWithCryptoStatus({ client, transactionHash: swapTxResult.transactionHash, }}); ` ##### Signature `function getBuyWithCryptoStatus( buyWithCryptoTransaction: [BuyWithCryptoTransaction](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransaction), ): Promise<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus)>; ` ### Parameters ##### buyWithCryptoTransaction Object of type [BuyWithCryptoTransaction](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransaction) #### Type `let buyWithCryptoTransaction: { chainId: number; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); transactionHash: string; }; ` ### Returns ##### Return Type `let returnType: | { status: "NOT_FOUND" } | { bridge?: string; destination?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); failureMessage?: string; fromAddress: string; purchaseData?: object; quote: BuyWithCryptoQuoteSummary; source?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); status: BuyWithCryptoStatuses; subStatus: BuyWithCryptoSubStatuses; swapType: SwapType; toAddress: string; }; ` Object of type [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) ## getBuyWithCryptoTransfer Get a quote of type [BuyWithCryptoTransfer](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransfer) to facilitate a token transfer transaction. Using this instead of a native transfer allows you to receive status and webhooks about successful or failed payments. Once you have the quote, you can use `prepareTransaction` and prepare the transaction for submission. ### Example `import { getBuyWithCryptoTransfer } from "thirdweb/pay"; const transfer = await getBuyWithCryptoTransfer({ client, fromAddress: "0x...", // wallet address toAddress: "0x...", // recipient address - likely to be your wallet chainId: 10, // chain id of the token tokenAddress: "0x...", // address of the token amount: "10", // amount of token to transfer purchaseData: { // any metadata for you to attribute this purchase customerId: "yourId", }, }); ` ##### Signature `function getBuyWithCryptoTransfer( params: [GetBuyWithCryptoTransferParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithCryptoTransferParams), ): Promise<[BuyWithCryptoTransfer](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransfer)>; ` ### Parameters ##### params object of type [GetBuyWithCryptoTransferParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithCryptoTransferParams) #### Type `let params: { amount: string; chainId: number; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; purchaseData?: object; toAddress: string; tokenAddress: string; }; ` ### Returns ##### Return Type `let returnType: { approvalData?: QuoteApprovalInfo; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); estimatedGasCostUSDCents: number; fromAddress: string; paymentToken: QuotePaymentToken; processingFee: QuotePaymentToken; toAddress: string; transactionRequest: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); }; ` Object of type [BuyWithCryptoTransfer](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransfer) which contains the information about the transfer ## getBuyWithFiatQuote Get a quote of type [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) to buy given token with fiat currency. This quote contains the information about the swap such as token amounts, processing fees, estimated time etc. #### Rendering the On-Ramp provider UI Once you have the `quote` , you can open the `quote.onRampLink` in a new tab - This will prompt the user to buy the token with fiat currency #### Determining the steps required If `quote.onRampToken.token` is same as `quote.toToken` ( same chain + same token address ) - This means that the token can be directly bought from the on-ramp provider. But if they are different, On-ramp provider will send the `quote.onRampToken` to the user's wallet address and a swap is required to swap it to the desired token onchain. You can use the [isSwapRequiredPostOnramp](https://portal.thirdweb.com/references/typescript/v5/isSwapRequiredPostOnramp) utility function to check if a swap is required after the on-ramp is done. #### Polling for the status Once you open the `quote.onRampLink` in a new tab, you can start polling for the status using [getBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatStatus) to get the status of the transaction. `getBuyWithFiatStatus` returns a status object of type [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus) . * If no swap is required - the status will become `"ON_RAMP_TRANSFER_COMPLETED"` once the on-ramp provider has sent the desired token to the user's wallet address. Once you receive this status, the process is complete. * If a swap is required - the status will become `"CRYPTO_SWAP_REQUIRED"` once the on-ramp provider has sent the tokens to the user's wallet address. Once you receive this status, you need to start the swap process. #### Swap Process On receiving the `"CRYPTO_SWAP_REQUIRED"` status, you can use the [getPostOnRampQuote](https://portal.thirdweb.com/references/typescript/v5/getPostOnRampQuote) function to get the quote for the swap of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) . Once you have this quote - You can follow the same steps as mentioned in the [getBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoQuote) documentation to perform the swap. ### Example Get a quote for buying 10 USDC on polygon chain (chainId: 137) with USD fiat currency: `import { getBuyWithFiatQuote } from "thirdweb/pay"; const quote = await getBuyWithFiatQuote({ client: client, // thirdweb client fromCurrencySymbol: "USD", // fiat currency symbol toChainId: 137, // polygon chain id toAmount: "10", // amount of USDC to buy toTokenAddress: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359" // USDC token address in polygon chain toAddress: "0x...", // user's wallet address isTestMode: false, // whether to use onramp in test mode for testing purpose (defaults to false) }); window.open(quote.onRampLink, "_blank"); ` ##### Signature `function getBuyWithFiatQuote( params: [GetBuyWithFiatQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatQuoteParams), ): Promise<[BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote)>; ` ### Parameters ##### params object of type [GetBuyWithFiatQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatQuoteParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromAmount?: string; fromCurrencySymbol: CurrencyMeta["shorthand"]; isTestMode?: boolean; maxSlippageBPS?: number; preferredProvider?: FiatProvider; purchaseData?: object; toAddress: string; toAmount?: string; toChainId: number; toGasAmountWei?: string; toTokenAddress: string; }; ` ### Returns ##### Return Type `let returnType: { estimatedDurationSeconds: number; estimatedToAmountMin: string; estimatedToAmountMinWei: string; fromAddress: string; fromCurrency: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; fromCurrencyWithFees: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; intentId: string; maxSlippageBPS: number; onRampLink: string; onRampToken: { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; processingFees: Array<{ amount: string; amountUnits: string; currencySymbol: string; decimals: number; feeType: "ON_RAMP" | "NETWORK"; }>; provider: FiatProvider; routingToken?: { amount: string; amountUSDCents: number; amountWei: string; token: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; toAddress: string; toAmountMin: string; toAmountMinWei: string; toToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; ` Object of type [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) which contains the information about the quote such as processing fees, estimated time, converted token amounts, etc. ## getBuyWithFiatHistory Get the "Buy with fiat" transaction history for a given wallet address ### Example `import { createThirdwebClient } from "thirdweb"; import { getBuyWithFiatHistory } from "thirdweb/pay"; const client = createThirdwebClient({ clientId: "..." }); // get the 10 latest "Buy with fiat" transactions dony by the wallet const history = await getBuyWithFiatHistory({ client: client, walletAddress: "0x...", start: 0, count: 10, }); ` ##### Signature `function getBuyWithFiatHistory( params: [BuyWithFiatHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryParams), ): Promise<[BuyWithFiatHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData)>; ` ### Parameters ##### params Object of type [BuyWithFiatHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ### Returns ##### Return Type `let returnType: { hasNextPage: boolean; page: Array<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; }; ` Object of type [BuyWithFiatHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData) ## getBuyHistory Get Buy transaction history for a given wallet address. This includes both "Buy with Cryto" and "Buy with Fiat" transactions ### Example `import { createThirdwebClient } from "thirdweb"; import { getBuyHistory } from "thirdweb/pay"; const client = createThirdwebClient({ clientId: "..." }); const history = await getBuyHistory({ client, walletAddress: "0x...", }); ` ##### Signature `function getBuyHistory( params: [BuyHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryParams), ): Promise<[BuyHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryData)>; ` ### Parameters ##### params Object of type [BuyHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ### Returns ##### Return Type `let returnType: { hasNextPage: boolean; page: Array< | { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus) } | { buyWithCryptoStatus: [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) } >; }; ` ## getBuyWithCryptoQuote Get a quote of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) to buy any given token with crypto. This quote contains the information about the swap such as token amounts, processing fees, estimated time etc. Once you have the quote, you can use `prepareTransaction` and prepare the transaction for submission. ### Example `` import { getBuyWithCryptoQuote } from "thirdweb/pay"; const quote = await getBuyWithCryptoQuote({ client, fromAddress: "0x...", // wallet address fromChainId: 137, // chain id of the source token fromTokenAddress: "0x...", // token address of the source token fromAmount: "10", // amount of source token to swap // optionally, you can use `toAmount` instead if you only want a certain amount of destination token toChainId: 10, // chain id of the destination token toTokenAddress: "0x...", // token address of the destination token toAddress: "0x...", // optional: send the tokens to a different address maxSlippageBPS: 50, // optional: max 0.5% slippage }); `` ##### Signature `function getBuyWithCryptoQuote( params: [GetBuyWithCryptoQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithCryptoQuoteParams), ): Promise<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` ### Parameters ##### params object of type [GetBuyWithCryptoQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithCryptoQuoteParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromChainId: number; fromTokenAddress: string; intentId?: string; maxSlippageBPS?: number; purchaseData?: object; toAddress: string; toChainId: number; toTokenAddress: string; } & ( | { fromAmount: string; toAmount?: never } | { fromAmount?: never; toAmount: string } ); ` ### Returns ##### Return Type `let returnType: { approvalData?: QuoteApprovalInfo; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); paymentTokens: Array; processingFees: Array; swapDetails: { estimated: { durationSeconds?: number; feesUSDCents: number; fromAmountUSDCents: number; gasCostUSDCents?: number; slippageBPS: number; toAmountMinUSDCents: number; toAmountUSDCents: number; }; fromAddress: string; fromAmount: string; fromAmountWei: string; fromToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); maxSlippageBPS: number; toAddress: string; toAmount: string; toAmountMin: string; toAmountMinWei: string; toAmountWei: string; toToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); }; transactionRequest: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); }; ` Object of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) which contains the information about the quote such as processing fees, estimated time, converted token amounts, etc. ## getChainMetadata Retrieves chain data for a given chain. ### Example `const chain = defineChain({ id: 1 }); const chainData = await getChainMetadata(chain); console.log(chainData); ` ##### Signature `function getChainMetadata(chain: Readonly): Promise<[ChainMetadata](https://portal.thirdweb.com/references/typescript/v5/ChainMetadata)>; ` ### Parameters ##### chain The chain object containing the chain ID. #### Type `let chain: Readonly; ` ### Returns ##### Return Type `let returnType: { chain: string; chainId: number; ens?: { registry: string }; explorers?: Readonly>; faucets?: readonly Array; features?: Readonly>; icon?: Icon; infoURL?: string; name: string; nativeCurrency: { decimals: number; name: string; symbol: string }; networkId?: number; parent?: { bridges?: Readonly>; chain: string; type: string }; redFlags?: readonly Array; rpc: readonly Array; shortName: string; slip44?: number; slug: string; stackType: string; status?: string; testnet: boolean; title?: string } ` A Promise that resolves to the chain data. ## getClaimParams Get the claim parameters for a given drop ### Example `import { getClaimParams } from "thirdweb/utils"; const claimParams = await getClaimParams({ contract, to: "0x...", quantity: 1n, type: "erc1155", tokenId: 0n, }); ` ##### Signature `` function getClaimParams( options: [GetClaimParamsOptions](https://portal.thirdweb.com/references/typescript/v5/GetClaimParamsOptions), ): Promise<{ allowlistProof: OverrideProof; currency: string; data: `0x${string}`; overrides: { erc20Value: | undefined | { amountWei: bigint; tokenAddress: string }; value: bigint; }; pricePerToken: bigint; quantity: bigint; receiver: string; tokenId: undefined | bigint; }>; `` ### Parameters ##### options The options for getting the claim parameters #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); from?: string; quantity: bigint; singlePhaseDrop?: boolean; to: string; } & ( | { type: "erc721" } | { tokenDecimals: number; type: "erc20" } | { tokenId: bigint; type: "erc1155" } ); ` ### Returns ##### Return Type `` let returnType: Promise<{ allowlistProof: OverrideProof; currency: string; data: `0x${string}`; overrides: { erc20Value: | undefined | { amountWei: bigint; tokenAddress: string }; value: bigint; }; pricePerToken: bigint; quantity: bigint; receiver: string; tokenId: undefined | bigint; }>; `` The claim parameters ## getContract Creates a Thirdweb contract by combining the Thirdweb client and contract options. ### Example `import { createThirdwebClient, getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const contract = getContract({ client, chain: sepolia, address: "0x123...", // optional ABI abi: [...], }); ` ##### Signature `` function getContract( options: [ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions), ): Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ### Parameters ##### options The options for creating the contract. #### Type `let options: [ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions); ` ### Returns ##### Return Type `` let returnType: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` The Thirdweb contract. ## getCompilerMetadata Down the compiled metadata from thirdweb contract api and format it ### Example `import { getCompilerMetadata, getContract } from "thirdweb/contracts"; const contract = getContract({ address: "0x...", chain: ethereum, client: "", }); const metadata = await getCompilerMetadata(contract); ` ##### Signature `function getCompilerMetadata( contract: Readonly, ): Promise; ` ### Parameters ##### contract #### Type `let contract: Readonly; ` ### Returns ##### Return Type `let returnType: Promise; ` The compiler metadata for the contract ## getContractEvents Retrieves events from a contract based on the provided options. ### Example `import { getContractEvents } from "thirdweb"; const events = await getContractEvents({ contract: myContract, fromBlock: 123456n, toBlock: 123456n, events: [preparedEvent, preparedEvent2], }); ` ##### Signature `function getContractEvents( options: [GetContractEventsOptions](https://portal.thirdweb.com/references/typescript/v5/GetContractEventsOptions), ): Promise<[GetContractEventsResult](https://portal.thirdweb.com/references/typescript/v5/GetContractEventsResult)>; ` ### Parameters ##### options The options for retrieving events. #### Type `let options: [GetContractEventsOptions](https://portal.thirdweb.com/references/typescript/v5/GetContractEventsOptions); ` ### Returns ##### Return Type `let returnType: [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult); ` A promise that resolves to an array of parsed event logs. Note: toBlock and fromBlock are both inclusive. ## getBytecode Retrieves the bytecode of a contract. ### Example `import { getBytecode } from "thirdweb/contract"; const bytecode = await getBytecode(contract); ` ##### Signature `` function getBytecode(contract: Readonly): Promise<`0x${string}`>; `` ### Parameters ##### contract The ThirdwebContract instance. #### Type `let contract: Readonly; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` A Promise that resolves to the bytecode of the contract. ## getContractPublisher Returns the default publisher contract on polygon ##### Signature `` function getContractPublisher( client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient), ): Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)<[], `0x${string}`>>; `` ### Parameters ##### client #### Type `let client: { readonly clientId: string; readonly secretKey: string | undefined; } & Readonly; ` ### Returns ##### Return Type `` let returnType: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)<[], `0x${string}`>>; `` ## getGasPrice Retrieves the gas price for a transaction on a specific chain. ### Example `import { getGasPrice } from "thirdweb"; const gasPrice = await getGasPrice({ client, chain }); ` ##### Signature `function getGasPrice(options: [GetGasPriceOptions](https://portal.thirdweb.com/references/typescript/v5/GetGasPriceOptions)): Promise; ` ### Parameters ##### options #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); percentMultiplier?: number; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the gas price as a bigint. ## getBuyWithFiatStatus Once you get a `quote` from [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote)and open the `quote.onRampLink` in a new tab, you can start polling for the transaction status using `getBuyWithFiatStatus` You should keep calling this function at regular intervals while the status is in one of the pending states such as - "PENDING\_PAYMENT", "PENDING\_ON\_RAMP\_TRANSFER", "ON\_RAMP\_TRANSFER\_IN\_PROGRESS", "CRYPTO\_SWAP\_IN\_PROGRESS" etc.. If `quote.onRampToken` is same as `quote.toToken` (same chain + same token address) - This means that the token can be directly bought from the on-ramp provider. But if they are different - On-ramp provider will send the `quote.onRampToken` to the user's wallet address and a swap is required to convert it to the desired token. You can use the [isSwapRequiredPostOnramp](https://portal.thirdweb.com/references/typescript/v5/isSwapRequiredPostOnramp) utility function to check if a swap is required after the on-ramp is done. ##### When no swap is required If there is no swap required - the status will become `"ON_RAMP_TRANSFER_COMPLETED"` once the on-ramp provider has sent the tokens to the user's wallet address. Once you receive this status, the process is complete. #### When a swap is required If a swap is required - the status will become `"CRYPTO_SWAP_REQUIRED"` once the on-ramp provider has sent the tokens to the user's wallet address. Once you receive this status, you need to start the swap process. On receiving the `"CRYPTO_SWAP_REQUIRED"` status, you can use the [getPostOnRampQuote](https://portal.thirdweb.com/references/typescript/v5/getPostOnRampQuote) function to get the quote for the swap of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) . Once you have this quote - You can follow the same steps as mentioned in the [getBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoQuote) documentation to perform the swap. ### Example `// step 1 - get a quote const fiatQuote = await getBuyWithFiatQuote(fiatQuoteParams); // step 2 - open the on-ramp provider UI window.open(quote.onRampLink, "_blank"); // step 3 - keep calling getBuyWithFiatStatus while the status is in one of the pending states const fiatStatus = await getBuyWithFiatStatus({ client, intentId: fiatQuote.intentId, }); // when the fiatStatus.status is "ON_RAMP_TRANSFER_COMPLETED" - the process is complete // when the fiatStatus.status is "CRYPTO_SWAP_REQUIRED" - start the swap process ` ##### Signature `function getBuyWithFiatStatus( params: [GetBuyWithFiatStatusParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatStatusParams), ): Promise<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; ` ### Parameters ##### params Object of type [GetBuyWithFiatStatusParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatStatusParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); intentId: string }; ` ### Returns ##### Return Type `let returnType: | { status: "NOT_FOUND" } | { destination?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); failureMessage?: string; fromAddress: string; intentId: string; purchaseData?: object; quote: { createdAt: string; estimatedDurationSeconds?: number; estimatedOnRampAmount: string; estimatedOnRampAmountWei: string; estimatedToTokenAmount: string; estimatedToTokenAmountWei: string; fromCurrency: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; fromCurrencyWithFees: { amount: string; amountUnits: string; currencySymbol: string; decimals: number; }; onRampToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); toToken: [PayTokenInfo](https://portal.thirdweb.com/references/typescript/v5/PayTokenInfo); }; source?: [PayOnChainTransactionDetails](https://portal.thirdweb.com/references/typescript/v5/PayOnChainTransactionDetails); status: | "NONE" | "PENDING_PAYMENT" | "PAYMENT_FAILED" | "PENDING_ON_RAMP_TRANSFER" | "ON_RAMP_TRANSFER_IN_PROGRESS" | "ON_RAMP_TRANSFER_COMPLETED" | "ON_RAMP_TRANSFER_FAILED" | "CRYPTO_SWAP_REQUIRED" | "CRYPTO_SWAP_COMPLETED" | "CRYPTO_SWAP_FALLBACK" | "CRYPTO_SWAP_IN_PROGRESS" | "CRYPTO_SWAP_FAILED"; toAddress: string; }; ` ## getOrDeployInfraForPublishedContract Gets or deploys the infrastructure contracts needed for a published contract deployment ##### Signature `function getOrDeployInfraForPublishedContract( args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } & { constructorParams?: Record; contractId: string; publisher?: string; version?: string; }, ): Promise<{ cloneFactoryContract: Readonly; implementationContract: Readonly; }>; ` ### Parameters ##### args The arguments object #### Type `let args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } & { constructorParams?: Record; contractId: string; publisher?: string; version?: string; }; ` ### Returns ##### Return Type `let returnType: Promise<{ cloneFactoryContract: Readonly; implementationContract: Readonly; }>; ` An object containing: * cloneFactoryContract: The factory contract used for creating clones * implementationContract: The deployed implementation contract ## getLastAuthProvider Retrieves the last authentication provider used from local storage. This function is designed to work only in a browser environment. ### Example `import { getLastAuthProvider } from "thirdweb/react"; const lastAuthProvider = await getLastAuthProvider(); ` ##### Signature `function getLastAuthProvider(): Promise< | null | OAuthOption | "backend" | "email" | "phone" | "passkey" | "wallet" | "jwt" | "auth_endpoint" | "iframe_email_verification" | "iframe" >; ` ### Returns ##### Return Type `let returnType: Promise< | null | OAuthOption | "backend" | "email" | "phone" | "passkey" | "wallet" | "jwt" | "auth_endpoint" | "iframe_email_verification" | "iframe" >; ` A promise that resolves to the last authentication provider strategy used, or `null` if none is found. ## getPaymasterAndData Get paymaster and data details for a user operation. ### Example `import { getPaymasterAndData } from "thirdweb/wallets/smart"; const userOp = createUnsignedUserOp(...); const paymasterAndData = await getPaymasterAndData({ userOp, client, chain, }); ` ##### Signature `function getPaymasterAndData(args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; paymasterOverride?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; userOp: UserOperationV06 | UserOperationV07; }): Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; ` ### Parameters ##### args The userOp and options #### Type `let args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; paymasterOverride?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; userOp: UserOperationV06 | UserOperationV07; }; ` ### Returns ##### Return Type `let returnType: { callGasLimit?: bigint; preVerificationGas?: bigint; verificationGasLimit?: bigint; } & ( | { paymasterAndData: string } | { paymaster: string; paymasterData: string; paymasterPostOpGasLimit?: bigint; paymasterVerificationGasLimit?: bigint; } ); ` * The paymaster and data details for the user operation. ## getProfiles Gets the linked profiles for the connected in-app or ecosystem wallet. ### Example `import { getProfiles } from "thirdweb/wallets"; const profiles = await getProfiles({ client, }); console.log(profiles[0].type); // will be "email", "phone", "google", "discord", etc console.log(profiles[0].details.email); console.log(profiles[0].details.phone); ` #### Getting profiles for a ecosystem user `import { getProfiles } from "thirdweb/wallets/in-app"; const profiles = await getProfiles({ client, ecosystem: { id: "ecosystem.your-ecosystem-id", }, }); ` ##### Signature `function getProfiles( args: [GetAuthenticatedUserParams](https://portal.thirdweb.com/references/typescript/v5/GetAuthenticatedUserParams), ): Promise>; ` ### Parameters ##### args #### Type `let args: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem }; ` ### Returns ##### Return Type `let returnType: { details: { address?: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); email?: string; id?: string; phone?: string; }; type: AuthOption; }; ` An array of accounts user profiles linked to the connected wallet. ## getPostOnRampQuote When buying a token with fiat currency - It only involes doing on-ramp if the on-ramp provider supports buying the given destination token directly. If the on-ramp provider does not support buying the destination token directly, user can be sent an intermediate token with fiat currency from the on-ramp provider which can be swapped to destination token onchain. `getPostOnRampQuote` function is used to get the quote for swapping the on-ramp token to destination token. When you get a "Buy with Fiat" status of type "CRYPTO\_SWAP\_REQUIRED" from the [getBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatStatus) function, you can use `getPostOnRampQuote` function to get the quote of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) for swapping the on-ramp token to destination token Once you have the quote, you can start the Swap process by following the same steps as mentioned in the [getBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoQuote) documentation. ### Example `import { getPostOnRampQuote, getBuyWithFiatStatus, } from "thirdweb/pay"; // previous steps const fiatQuote = await getBuyWithFiatQuote(fiatQuoteParams); window.open(fiatQuote.onRampLink, "_blank"); const buyWithFiatStatus = await getBuyWithFiatStatus({ client, intentId, }); // keep calling this until status is "settled" state // when a swap is required after onramp if (buyWithFiatStatus.status === "CRYPTO_SWAP_REQUIRED") { const buyWithCryptoQuote = await getPostOnRampQuote({ client, buyWithFiatStatus, }); } ` ##### Signature `function getPostOnRampQuote( params: [GetPostOnRampQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetPostOnRampQuoteParams), ): Promise<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` ### Parameters ##### params object of type [GetPostOnRampQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetPostOnRampQuoteParams) #### Type `let params: { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ### Returns ##### Return Type `let returnType: { approvalData?: QuoteApprovalInfo; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); paymentTokens: Array; processingFees: Array; swapDetails: { estimated: { durationSeconds?: number; feesUSDCents: number; fromAmountUSDCents: number; gasCostUSDCents?: number; slippageBPS: number; toAmountMinUSDCents: number; toAmountUSDCents: number; }; fromAddress: string; fromAmount: string; fromAmountWei: string; fromToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); maxSlippageBPS: number; toAddress: string; toAmount: string; toAmountMin: string; toAmountMinWei: string; toAmountWei: string; toToken: [QuoteTokenInfo](https://portal.thirdweb.com/references/typescript/v5/QuoteTokenInfo); }; transactionRequest: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions); }; ` Object of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) which contains the information about the quote such as processing fees, estimated time, converted token amounts, etc. ## getRpcClient Returns an RPC request that can be used to make JSON-RPC requests. ### Example `import { createThirdwebClient } from "thirdweb"; import { getRpcClient } from "thirdweb/rpc"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const rpcRequest = getRpcClient({ client, chain: ethereum }); const blockNumber = await rpcRequest({ method: "eth_blockNumber", }); ` ##### Signature `` function getRpcClient( options: Readonly, ): EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ### Parameters ##### options The RPC options. #### Type `let options: Readonly; ` ### Returns ##### Return Type `` let returnType: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` The RPC request function. ## getSaltHash Calculates the salt hash for a given bytecode. ### Example `import { getSaltHash } from "thirdweb"; const saltHash = getSaltHash(bytecode); ` ##### Signature `` function getSaltHash(bytecode: string): `0x${string}`; `` ### Parameters ##### bytecode The bytecode to calculate the salt hash for. #### Type `let bytecode: string; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The salt hash of the bytecode. ## getRpcUrlForChain Retrieves the RPC URL for the specified chain. If a custom RPC URL is defined in the options, it will be used. Otherwise, a thirdweb RPC URL will be constructed using the chain ID and client ID. ### Example `import { getRpcUrlForChain } from "thirdweb/chains"; const rpcUrl = getRpcUrlForChain({ chain: 1, client }); console.log(rpcUrl); // "https://1.rpc.thirdweb.com/... ` ##### Signature `function getRpcUrlForChain(options: GetRpcUrlForChainOptions): string; ` ### Parameters ##### options The options object containing the chain and client information. #### Type `let options: GetRpcUrlForChainOptions; ` ### Returns ##### Return Type `let returnType: string; ` The RPC URL for the specified chain. ## getSocialIcon Gets the icon URI for a given social authentication provider ### Example `const googleIcon = getSocialIcon("google"); const appleIcon = getSocialIcon("apple"); ` ##### Signature `function getSocialIcon( provider: | "google" | "apple" | "facebook" | "discord" | "line" | "x" | "coinbase" | "farcaster" | "telegram" | "github" | "twitch" | "steam" | "guest" | "backend" | "email" | "phone" | "passkey" | "wallet" | ({} & string), ): string; ` ### Parameters ##### provider The authentication provider to get the icon for #### Type `let provider: | "google" | "apple" | "facebook" | "discord" | "line" | "x" | "coinbase" | "farcaster" | "telegram" | "github" | "twitch" | "steam" | "guest" | "backend" | "email" | "phone" | "passkey" | "wallet" | ({} & string); ` ### Returns ##### Return Type `let returnType: string; ` A data URI containing the SVG icon for the provider, or a generic wallet icon if the provider is not recognized ## getSocialProfiles Fetches the wallet's available social profiles. ### Example `import { getSocialProfiles } from "thirdweb/social"; const profiles = await getSocialProfiles({ address: "0x...", client, }); ` ##### Signature `function getSocialProfiles(args: { address: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }): Promise>; ` ### Parameters ##### args The arguments to use when fetching the social profiles. #### Type `let args: { address: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: { avatar?: string; bio?: string; metadata?: [FarcasterProfile](https://portal.thirdweb.com/references/typescript/v5/FarcasterProfile) | [LensProfile](https://portal.thirdweb.com/references/typescript/v5/LensProfile) | [EnsProfile](https://portal.thirdweb.com/references/typescript/v5/EnsProfile); name?: string; type: "farcaster" | "lens" | "ens"; }; ` A promise resolving to the array of social profiles for the given address. ## getUser Gets user based on the provided query parameters. This function is only available on the server (a secret key is required in the client). ### Example `import { getUser } from "thirdweb/wallets"; const user = await getUser({ client, walletAddress: "0x123...", }); ` ##### Signature `function getUser(options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; email?: string; externalWalletAddress?: string; id?: string; phone?: string; walletAddress?: string; }): Promise; ` ### Parameters ##### options The options for the get user function. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem; email?: string; externalWalletAddress?: string; id?: string; phone?: string; walletAddress?: string; }; ` ### Returns ##### Return Type `let returnType: { createdAt: string; email?: string; phone?: string; profiles: Array<[Profile](https://portal.thirdweb.com/references/typescript/v5/Profile)>; userId: string; walletAddress: string; }; ` A user object or null if not found. ## getUserEmail Retrieves the authenticated user email for the active in-app wallet. ### Example `import { getUserEmail } from "thirdweb/wallets/in-app"; const email = await getUserEmail({ client }); console.log(email); ` ##### Signature `function getUserEmail( options: [GetAuthenticatedUserParams](https://portal.thirdweb.com/references/typescript/v5/GetAuthenticatedUserParams), ): Promise; ` ### Parameters ##### options The arguments for retrieving the authenticated user. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem }; ` ### Returns ##### Return Type `let returnType: Promise; ` The authenticated user email if logged in and wallet initialized, otherwise undefined. ## getTransactionStore Retrieve the transaction store for a given address. ### Example `import { getTransactionStore } from "thirdweb/transaction"; const store = getTransactionStore("0x..."); store.subscribe((transactions) => { console.log(transactions); }); ` ##### Signature `function getTransactionStore( address: string, ): Store>; ` ### Parameters ##### address The address to retrieve the transaction store for. #### Type `let address: string; ` ### Returns ##### Return Type `let returnType: Store>; ` A store of transactions for the given account to subscribe to. ## getUserOpGasFees Get the gas fees of a user operation. ### Example `import { getUserOpGasPrice } from "thirdweb/wallets/smart"; const fees = await getUserOpGasPrice({ options, }); ` ##### Signature `function getUserOpGasFees(args: { options: BundlerOptions; }): Promise; ` ### Parameters ##### args The options for getting the gas price of a user operation. #### Type `let args: { options: BundlerOptions }; ` ### Returns ##### Return Type `let returnType: Promise; ` The gas price of the user operation. ## getUserOpHash Get the hash of a user operation. ### Example `import { getUserOpHash } from "thirdweb/wallets/smart"; const userOp = await createUnsignedUserOp(...); const userOpHash = await getUserOpHash({ client, userOp, chain, }); ` ##### Signature `` function getUserOpHash(args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; userOp: UserOperationV06 | UserOperationV07; }): Promise<`0x${string}`>; `` ### Parameters ##### args The options for getting the user operation hash #### Type `let args: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; userOp: UserOperationV06 | UserOperationV07; }; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` * The user operation hash ## getUserOpReceipt Get the receipt of a user operation. ### Example `import { getUserOpReceipt } from "thirdweb/wallets/smart"; const receipt = await getUserOpReceipt({ client, chain, userOpHash, }); ` ##### Signature `` function getUserOpReceipt( args: BundlerOptions & { userOpHash: `0x${string}` }, ): Promise; `` ### Parameters ##### args The options for getting the receipt of a user operation. #### Type `` let args: BundlerOptions & { userOpHash: `0x${string}` }; `` ### Returns ##### Return Type `let returnType: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` The receipt of the user operation. ## getDefaultToken Get the default token for a given chain and symbol ### Example `import { getDefaultToken } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; const token = getDefaultToken(ethereum, "USDC"); ` ##### Signature `function getDefaultToken( chain: Readonly, symbol: | "WETH" | "USDT" | "USDC" | "WBTC" | "WMATIC" | "WBNB" | "BUSD" | "WFTM" | "WAVAX", ): undefined | [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); ` ### Parameters ##### chain The chain to get the token for #### Type `let chain: Readonly; ` ##### symbol The symbol of the token to get #### Type `let symbol: | "WETH" | "USDT" | "USDC" | "WBTC" | "WMATIC" | "WBNB" | "BUSD" | "WFTM" | "WAVAX"; ` ### Returns ##### Return Type `let returnType: undefined | [TokenInfo](https://portal.thirdweb.com/references/typescript/v5/TokenInfo); ` The default token for the given chain and symbol ## getUserOpReceiptRaw Get the receipt of a user operation. ### Example `import { getUserOpReceiptRaw } from "thirdweb/wallets/smart"; const receipt = await getUserOpReceiptRaw({ client, chain, userOpHash, }); ` ##### Signature `` function getUserOpReceiptRaw( args: BundlerOptions & { userOpHash: `0x${string}` }, ): Promise; `` ### Parameters ##### args The options for getting the receipt of a user operation. #### Type `` let args: BundlerOptions & { userOpHash: `0x${string}` }; `` ### Returns ##### Return Type `let returnType: Promise; ` The raw receipt of the user operation. ## getUserPhoneNumber Retrieves the authenticated user phone number for the active embedded wallet. ### Example `import { getUserPhoneNumber } from "thirdweb/wallets/embedded"; const phoneNumber = await getUserPhoneNumber({ client }); console.log(phoneNumber); ` ##### Signature `function getUserPhoneNumber( options: [GetAuthenticatedUserParams](https://portal.thirdweb.com/references/typescript/v5/GetAuthenticatedUserParams), ): Promise; ` ### Parameters ##### options The arguments for retrieving the authenticated user. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ecosystem?: Ecosystem }; ` ### Returns ##### Return Type `let returnType: Promise; ` The authenticated user phone number if authenticated with phone number, otherwise undefined. ## getWalletBalance Retrieves the balance of a token or native currency for a given wallet. ### Example `import { getWalletBalance } from "thirdweb/wallets"; const balance = await getWalletBalance({ address, client, chain, tokenAddress, }); ` ##### Signature `function getWalletBalance( options: [GetWalletBalanceOptions](https://portal.thirdweb.com/references/typescript/v5/GetWalletBalanceOptions), ): Promise; ` ### Parameters ##### options The options for retrieving the token balance. #### Type `let options: { address: string; chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); tokenAddress?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the token balance result. ## getInitBytecodeWithSalt Generates the initialization bytecode with salt for a contract deployment. ### Example `import { getInitBytecodeWithSalt } from "thirdweb/utils"; const initBytecodeWithSalt = getInitBytecodeWithSalt({ bytecode, encodedArgs, salt, }); ` ##### Signature `` function getInitBytecodeWithSalt( options: GetInitiBytecodeWithSaltOptions, ): `0x${string}`; `` ### Parameters ##### options The options for generating the initialization bytecode. #### Type `let options: GetInitiBytecodeWithSaltOptions; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The initialization bytecode with salt. ## hasStoredPasskey Returns whether this device has a stored passkey ready to be used for sign-in ##### Signature `` function hasStoredPasskey( client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient), ecosystemId?: `ecosystem.${string}`, storage?: [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage), ): Promise; `` ### Parameters ##### client the thirdweb client #### Type `let client: { readonly clientId: string; readonly secretKey: string | undefined; } & Readonly; ` ##### ecosystemId optional #### Type `` let ecosystemId: `ecosystem.${string}`; `` ##### storage optional #### Type `let storage: { getItem: (key: string) => Promise; removeItem: (key: string) => Promise; setItem: (key: string, value: string) => Promise; }; ` ### Returns ##### Return Type `let returnType: Promise; ` whether the device has a stored passkey ## hashMessage Ethereum Signed Message hashing ### Example `import { hashMessage } from "thirdweb/utils"; const hash = hashMessage("hello world"); ` ##### Signature `function hashMessage( message: SignableMessage, to_?: TTo, ): HashMessage; ` ### Parameters ##### message The message to hash, either as a string, a Uint8Array, or an object with a `raw` property containing a Uint8Array. #### Type `let message: SignableMessage; ` ##### to\_ optional The desired output format of the hash (optional). Defaults to 'hex'. #### Type `let to_: TTo; ` ### Returns ##### Return Type `let returnType: HashMessage; ` The Ethereum Signed Message hash of the message in the specified format. ## hexToBool Converts a hexadecimal string to a boolean value. ### Example `import { hexToBool } from "thirdweb/utils"; const bool = hexToBool("0x01"); console.log(bool); // true ` ##### Signature `` function hexToBool(hex: `0x${string}`, opts: Options): boolean; `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### opts Optional options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: boolean; ` The boolean value corresponding to the hexadecimal string. ## hexToBigInt Converts a hexadecimal string to a BigInt. ### Example `import { hexToBigInt } from "thirdweb/utils"; const bigInt = hexToBigInt("0x1a4"); console.log(bigInt); // 420n ` ##### Signature `` function hexToBigInt(hex: `0x${string}`, opts: Options): bigint; `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### opts Optional parameters for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: bigint; ` The BigInt representation of the hexadecimal string. ## hexToBytes Converts a hexadecimal string to a Uint8Array of bytes. ### Example `import { hexToBytes } from "thirdweb/utils"; const bytes = hexToBytes("0x1a4"); console.log(bytes); // Uint8Array(2) [ 1, 164 ] ` ##### Signature `` function hexToBytes(hex_: `0x${string}`, opts: Options): Uint8Array; `` ### Parameters ##### hex\_ The hexadecimal string to convert. #### Type `` let hex_: `0x${string}`; `` ##### opts Options for converting the hexadecimal string. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The Uint8Array of bytes. ## hexToNumber Converts a hexadecimal string to a number. ### Example `import { hexToNumber } from "thirdweb/utils"; const number = hexToNumber("0x1a4"); console.log(number); // 420 ` ##### Signature `` function hexToNumber(hex: `0x${string}`, opts: Options): number; `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### opts Optional options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: number; ` The converted number. ## hexToString Converts a hexadecimal string to a UTF-8 string. ### Example `import { hexToString } from "thirdweb/utils"; const string = hexToString("0x48656c6c6f2c20776f726c6421"); console.log(string); // "Hello, world!" ` ##### Signature `` function hexToString(hex: `0x${string}`, opts: Options): string; `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### opts The options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: string; ` The UTF-8 string representation of the hexadecimal string. ## hexToUint8Array Converts a hexadecimal string to a Uint8Array. ### Example `import { hexToUint8Array } from "thirdweb/utils"; const bytes = hexToUint8Array("0x48656c6c6f2c20776f726c6421"); console.log(bytes); // Uint8Array([72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33]) ` ##### Signature `` function hexToUint8Array( hex: `0x${string}`, opts: Options, ): Uint8Array; `` ### Parameters ##### hex The hexadecimal string to convert. #### Type `` let hex: `0x${string}`; `` ##### opts Options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The Uint8Array representation of the hexadecimal string. ## React Hooks ##### Extensions ##### EIP5792 ##### ENS ##### Wallets ##### Wallet Connection ##### Chain ##### Contract ##### Transactions ##### Social API ##### Buy Crypto ##### Utils ## inAppWallet Creates an app scoped wallet for users based on various authentication methods. Full list of available authentication methods [ here](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure) . Can also be configured to use Account Abstraction to directly connect to a ERC4337 smart account based on those authentication methods. ### Example #### Login with socials `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); const account = await wallet.connect({ client, chain, strategy: "google", }); ` [ View all available social auth methods](https://portal.thirdweb.com/connect/wallet/sign-in-methods/configure) #### Enable smart accounts and sponsor gas for your users: `import { inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; const wallet = inAppWallet({ smartAccount: { chain: sepolia, sponsorGas: true, }, }); // account will be a smart account with sponsored gas enabled const account = await wallet.connect({ client, strategy: "google", }); ` #### Login with email `import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const wallet = inAppWallet(); // sends a verification code to the provided email await preAuthenticate({ client, strategy: "email", email: "example@example.com", }); // login with the verification code const account = await wallet.connect({ client, chain, strategy: "email", email: "example@example.com", verificationCode: "123456", }); ` #### Login with SIWE `import { inAppWallet, createWallet } from "thirdweb/wallets"; const rabby = createWallet("io.rabby"); const inAppWallet = inAppWallet(); const account = await inAppWallet.connect({ strategy: "wallet", chain: mainnet, wallet: rabby, client: MY_CLIENT, }); ` #### Login with phone number `import { inAppWallet, preAuthenticate, } from "thirdweb/wallets/in-app"; const wallet = inAppWallet(); // sends a verification code to the provided phone number await preAuthenticate({ client, strategy: "phone", phoneNumber: "+1234567890", }); // login with the verification code const account = await wallet.connect({ client, chain, strategy: "phone", honeNumber: "+1234567890", verificationCode: "123456", }); ` #### Login with passkey `import { inAppWallet, hasStoredPasskey, } from "thirdweb/wallets/in-app"; const wallet = inAppWallet(); const wallet = inAppWallet(); const hasPasskey = await hasStoredPasskey(client); await wallet.connect({ client, strategy: "passkey", type: hasPasskey ? "sign-in" : "sign-up", }); ` #### Connect to a guest account `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); const account = await wallet.connect({ client, strategy: "guest", }); ` #### Connect to a backend account `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); const account = await wallet.connect({ client, strategy: "backend", walletSecret: "...", // Provided by your app }); ` #### Connect with custom JWT (any OIDC provider) You can use any OIDC provider to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings. `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); const account = await wallet.connect({ client, strategy: "jwt", jwt: "your_jwt_here", }); ` #### Connect with custom endpoint You can also use your own endpoint to authenticate your users. Make sure to configure it in your dashboard under in-app wallet settings. `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); const account = await wallet.connect({ client, strategy: "auth_endpoint", payload: "your_auth_payload_here", }); ` #### Specify a logo for your login page (Connect UI) `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ metadata: { image: { src: "https://example.com/logo.png", alt: "My logo", width: 100, height: 100, }, }, }); ` #### Hide the ability to export the private key within the Connect Modal UI `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ hidePrivateKeyExport: true, }); ` #### Open the Oauth window in the same tab By default, the Oauth window will open in a popup window. You can change this behavior by setting the `auth.mode` option to `"redirect"` . `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet({ auth: { mode: "redirect", }, }); ` #### Override storage for the wallet state By default, wallet state is stored in the browser's local storage. You can override this behavior by providing a custom storage object, useful for server side integrations. `` import { inAppWallet } from "thirdweb/wallets"; import { AsyncStorage } from "thirdweb/storage"; const myStorage: AsyncStorage = { getItem: async (key) => { return customGet(`CUSTOM_STORAGE_KEY${key}`); }, setItem: async (key, value) => { return customSet(`CUSTOM_STORAGE_KEY${key}`, value); }, removeItem: async (key) => { return customRemove(`CUSTOM_STORAGE_KEY${key}`); }, }; const wallet = inAppWallet({ storage: myStorage, }); `` ##### Signature `function inAppWallet( createOptions?: [InAppWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions), ): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"inApp">; ` ### Parameters ##### createOptions optional configuration options Refer to [ InAppWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/InAppWalletCreationOptions) to see the available options. #### Type `let createOptions: | { auth?: { defaultSmsCountryCode?: SupportedSmsCountry; mode?: "popup" | "redirect" | "window"; options: Array<[InAppWalletAuth](https://portal.thirdweb.com/references/typescript/v5/InAppWalletAuth)>; passkeyDomain?: string; redirectUrl?: string; }; hidePrivateKeyExport?: boolean; metadata?: { image?: { alt?: string; height?: number; src: string; width?: number; }; }; partnerId?: string; smartAccount?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); storage?: [AsyncStorage](https://portal.thirdweb.com/references/typescript/v5/AsyncStorage); } | undefined; ` ### Returns ##### Return Type `let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"inApp">; ` The created in-app wallet. ## injectedProvider Get Injected Provider for given wallet by passing a wallet ID (rdns) using [ EIP-6963](https://eips.ethereum.org/EIPS/eip-6963) Provider Discovery. ### Example `import { injectedProvider } from "thirdweb/wallets"; const metamaskProvider = injectedProvider("io.metamask"); if (metamaskProvider) { console.log("Metamask is installed"); } ` ##### Signature `function injectedProvider(walletId: [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId)): undefined | Ethereum; ` ### Parameters ##### walletId The Wallet Id (rdns) to check. #### Type `let walletId: | "walletConnect" | "inApp" | "embedded" | "smart" | "adapter" | EcosystemWalletId | [WCSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/WCSupportedWalletIds) | [InjectedSupportedWalletIds](https://portal.thirdweb.com/references/typescript/v5/InjectedSupportedWalletIds); ` ### Returns ##### Return Type `let returnType: undefined | Ethereum; ` The details of the Injected Provider if it exists. `undefined` otherwise. ## isAddress Checks if a given string is a valid address. ### Example `import { isAddress } from "thirdweb/utils"; isAddress("0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed"); //=> true ` ##### Signature `` function isAddress(address: string): address is `0x${string}`; `` ### Parameters ##### address The address to check. #### Type `let address: string; ` ### Returns ##### Return Type `` let returnType: address is (`0x${string}`) `` True if the address is valid, false otherwise. ## isContractDeployed Checks if a contract is deployed by verifying its bytecode. ### Example `import { getContract } from "thirdweb/contract"; import { isContractDeployed } from "thirdweb/contract/utils"; const contract = getContract({ ... }); const isDeployed = await isContractDeployed(contract); console.log(isDeployed); ` ##### Signature `function isContractDeployed(contract: Readonly): Promise; ` ### Parameters ##### contract The contract to check. #### Type `let contract: Readonly; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to a boolean indicating whether the contract is deployed or not. ## isBytes ##### Signature `function isBytes(value: unknown): value is ByteArray; ` ### Parameters ##### value #### Type `let value: unknown; ` ### Returns ##### Return Type `let returnType: value is (ByteArray) ` ## isEIP155Enforced Checks whether EIP-155 is enforced by sending a random transaction of legacy type (pre-EIP-155) and parsing the error message. ### Example `import { isEIP155Enforced } from "thirdweb/utils"; const isEIP155 = await isEIP155Enforced({ chain, client }); ` ##### Signature `function isEIP155Enforced( options: IsEIP155EnforcedOptions, ): Promise; ` ### Parameters ##### options The options for checking EIP-155 enforcement. #### Type `let options: IsEIP155EnforcedOptions; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to a boolean indicating whether EIP-155 is enforced. ## isHex Checks if a value is a valid hexadecimal string. ### Example `import { isHex } from "thirdweb/utils"; const result = isHex("0x1a4"); console.log(result); // true ` ##### Signature `` function isHex( value: unknown, options: Options, ): value is `0x${string}`; `` ### Parameters ##### value The value to be checked. #### Type `let value: unknown; ` ##### options Optional configuration for the validation. #### Type `let options: Options; ` ### Returns ##### Return Type `` let returnType: value is (`0x${string}`) `` True if the value is a valid hexadecimal string, false otherwise. ## isSwapRequiredPostOnramp Check if a Swap is required after on-ramp when buying a token with fiat currency. If `quote.toToken` and `quote.onRampToken` are the same (same token and chain), it means on-ramp provider can directly send the desired token to the user's wallet and no swap is required. If `quote.toToken` and `quote.onRampToken` are different (different token or chain), A swap is required to swap the on-ramp token to the desired token. ##### Signature `function isSwapRequiredPostOnramp( buyWithFiatQuote: Pick<[BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote), "toToken" | "onRampToken">, ): boolean; ` ### Parameters ##### buyWithFiatQuote The quote of type [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) returned by the [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function. #### Type `let buyWithFiatQuote: Pick< [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote), "toToken" | "onRampToken" >; ` ### Returns ##### Return Type `let returnType: boolean; ` ## isValidENSName Checks if a string is a valid ENS name. It does not check if the ENS name is currently registered or resolves to an address - it only validates the string format. ### Example `isValidENSName("thirdweb.eth"); // true isValidENSName("foo.bar.com"); // true isValidENSName("xyz"); // false ` ##### Signature `function isValidENSName(name: string): boolean; ` ### Parameters ##### name The ENS name to check. #### Type `let name: string; ` ### Returns ##### Return Type `let returnType: boolean; ` ## isZkSyncChain Checks whether the given chain is part of the zksync stack ##### Signature `function isZkSyncChain(chain: Readonly): Promise; ` ### Parameters ##### chain #### Type `let chain: Readonly; ` ### Returns ##### Return Type `let returnType: Promise; ` ## isErc6492Signature ### Example `import { isErc6492Signature } from "thirdweb/auth"; const isErc6492 = isErc6492Signature( "0x1234567890123456789012345678901234567890", ); ` ##### Signature `` function isErc6492Signature(signature: `0x${string}`): boolean; `` ### Parameters ##### signature The signature to check for ERC6492 compatibility #### Type `` let signature: `0x${string}`; `` ### Returns ##### Return Type `let returnType: boolean; ` True if the signature is compatible with ERC6492, false otherwise ## exists Calls the "exists" function on the contract. ### Example `import { exists } from "thirdweb/extensions/lens"; const result = await exists({ contract, tokenId: ..., }); ` ##### Signature `function exists( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ExistsParams](https://portal.thirdweb.com/references/typescript/v5/ExistsParams)>, ): Promise; ` ### Parameters ##### options The options for the exists function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ExistsParams](https://portal.thirdweb.com/references/typescript/v5/ExistsParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## keccakId Calculates the keccak ID of the given input. ### Example `import { keccackId } from "thirdweb/utils"; const keccakId = keccackId(input); ` ##### Signature `` function keccakId(input: string): `0x${string}`; `` ### Parameters ##### input The input value to calculate the keccak ID for. #### Type `let input: string; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The keccak ID as a Hex string. ## keccak256 Calculates the Keccak-256 hash of the given value. ### Example `import { keccak256 } from "thirdweb/utils"; const hash = keccak256("0x1234"); ` ##### Signature `` function keccak256( value: `0x${string}` | Uint8Array, to?: TTo, ): Keccak256Hash; `` ### Parameters ##### value The value to hash, either as a hexadecimal string or a Uint8Array. #### Type `` let value: `0x${string}` | Uint8Array; `` ##### to optional The desired output format of the hash (optional). Defaults to 'hex'. #### Type `let to: TTo; ` ### Returns ##### Return Type `let returnType: Keccak256Hash; ` The Keccak-256 hash of the value in the specified format. ## getContentURI Calls the "getContentURI" function on the contract. ### Example `import { getContentURI } from "thirdweb/extensions/lens"; const result = await getContentURI({ contract, profileId: ..., pubId: ..., }); ` ##### Signature `function getContentURI( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetContentURIParams](https://portal.thirdweb.com/references/typescript/v5/GetContentURIParams)>, ): Promise; ` ### Parameters ##### options The options for the getContentURI function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetContentURIParams](https://portal.thirdweb.com/references/typescript/v5/GetContentURIParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getFollowData Calls the "getFollowData" function on the contract. ### Example `import { getFollowData } from "thirdweb/extensions/lens"; const result = await getFollowData({ contract, followTokenId: ..., }); ` ##### Signature `function getFollowData( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowDataParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowDataParams)>, ): Promise<{ followerProfileId: bigint; followTimestamp: number; originalFollowTimestamp: number; profileIdAllowedToRecover: bigint; }>; ` ### Parameters ##### options The options for the getFollowData function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowDataParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowDataParams)>; ` ### Returns ##### Return Type `let returnType: Promise<{ followerProfileId: bigint; followTimestamp: number; originalFollowTimestamp: number; profileIdAllowedToRecover: bigint; }>; ` The parsed result of the function call. ## getFollowTokenId Calls the "getFollowTokenId" function on the contract. ### Example `import { getFollowTokenId } from "thirdweb/extensions/lens"; const result = await getFollowTokenId({ contract, followerProfileId: ..., }); ` ##### Signature `function getFollowTokenId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowTokenIdParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowTokenIdParams)>, ): Promise; ` ### Parameters ##### options The options for the getFollowTokenId function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowTokenIdParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowTokenIdParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getFollowerProfileId Calls the "getFollowerProfileId" function on the contract. ### Example `import { getFollowerProfileId } from "thirdweb/extensions/lens"; const result = await getFollowerProfileId({ contract, followTokenId: ..., }); ` ##### Signature `function getFollowerProfileId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowerProfileIdParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowerProfileIdParams)>, ): Promise; ` ### Parameters ##### options The options for the getFollowerProfileId function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetFollowerProfileIdParams](https://portal.thirdweb.com/references/typescript/v5/GetFollowerProfileIdParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getFullProfile Return the profile data _with Lens handle_ and optional join date In Lens Protocol, each profile is associated with an ERC721 token, thus, the tokenId represent profileId and the 2 terms can be used interchangeably ### Example `import { getFullProfile } from "thirdweb/extension/lens"; const profileId = 10000n; // profileId is the tokenId of the NFT const lensProfile = await getFullProfile({ profileId, client }); ` ##### Signature `function getFullProfile( options: [GetFullProfileParams](https://portal.thirdweb.com/references/typescript/v5/GetFullProfileParams), ): Promise<[FullProfileResponse](https://portal.thirdweb.com/references/typescript/v5/FullProfileResponse)>; ` ### Parameters ##### options #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); includeJoinDate?: boolean; overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; lensHubAddress?: string; tokenHandleRegistryAddress?: string; }; profileId: bigint; }; ` ### Returns ##### Return Type `let returnType: { handle: string; joinDate: bigint | null; profileData: [LensProfileSchema](https://portal.thirdweb.com/references/typescript/v5/LensProfileSchema) | null; } | null; ` ## getFollowerCount Calls the "getFollowerCount" function on the contract. ### Example `import { getFollowerCount } from "thirdweb/extensions/lens"; const result = await getFollowerCount({ contract, }); ` ##### Signature `function getFollowerCount( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getFollowerCount function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getHandle Calls the "getHandle" function on the contract. ### Example `import { getHandle } from "thirdweb/extensions/lens"; const result = await getHandle({ contract, tokenId: ..., }); ` ##### Signature `function getHandle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetHandleParams](https://portal.thirdweb.com/references/typescript/v5/GetHandleParams)>, ): Promise; ` ### Parameters ##### options The options for the getHandle function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetHandleParams](https://portal.thirdweb.com/references/typescript/v5/GetHandleParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getHandleFromProfileId Return the Lens handle of a profile in the format: lens/@`` ### Example `import { getHandleFromProfileId } from "thirdweb/extensions/lens"; const profileId = 461662n; const handle = await getHandleFromProfileId({ profileId, client }); // "lens/@captain_jack" ` ##### Signature `function getHandleFromProfileId( options: [GetHandleFromProfileIdParams](https://portal.thirdweb.com/references/typescript/v5/GetHandleFromProfileIdParams), ): Promise; ` ### Parameters ##### options #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleAddress?: string; tokenHandleRegistryAddress?: string; }; profileId: bigint; }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## getHandleTokenURIContract Calls the "getHandleTokenURIContract" function on the contract. ### Example `import { getHandleTokenURIContract } from "thirdweb/extensions/lens"; const result = await getHandleTokenURIContract({ contract, }); ` ##### Signature `function getHandleTokenURIContract( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getHandleTokenURIContract function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getLocalName Calls the "getLocalName" function on the contract. ### Example `import { getLocalName } from "thirdweb/extensions/lens"; const result = await getLocalName({ contract, tokenId: ..., }); ` ##### Signature `function getLocalName( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetLocalNameParams](https://portal.thirdweb.com/references/typescript/v5/GetLocalNameParams)>, ): Promise; ` ### Parameters ##### options The options for the getLocalName function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetLocalNameParams](https://portal.thirdweb.com/references/typescript/v5/GetLocalNameParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getModuleTypes Calls the "getModuleTypes" function on the contract. ### Example `import { getModuleTypes } from "thirdweb/extensions/lens"; const result = await getModuleTypes({ contract, moduleAddress: ..., }); ` ##### Signature `function getModuleTypes( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetModuleTypesParams](https://portal.thirdweb.com/references/typescript/v5/GetModuleTypesParams)>, ): Promise; ` ### Parameters ##### options The options for the getModuleTypes function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetModuleTypesParams](https://portal.thirdweb.com/references/typescript/v5/GetModuleTypesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getProfile Calls the "getProfile" function on the contract. ### Example `import { getProfile } from "thirdweb/extensions/lens"; const result = await getProfile({ contract, profileId: ..., }); ` ##### Signature `function getProfile( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileParams)>, ): Promise<{ __DEPRECATED__followNFTURI: string; __DEPRECATED__handle: string; __DEPRECATED__imageURI: string; followModule: string; followNFT: string; metadataURI: string; pubCount: bigint; }>; ` ### Parameters ##### options The options for the getProfile function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileParams)>; ` ### Returns ##### Return Type `let returnType: Promise<{ __DEPRECATED__followNFTURI: string; __DEPRECATED__handle: string; __DEPRECATED__imageURI: string; followModule: string; followNFT: string; metadataURI: string; pubCount: bigint; }>; ` The parsed result of the function call. ## getOriginalFollowTimestamp Calls the "getOriginalFollowTimestamp" function on the contract. ### Example `import { getOriginalFollowTimestamp } from "thirdweb/extensions/lens"; const result = await getOriginalFollowTimestamp({ contract, followTokenId: ..., }); ` ##### Signature `function getOriginalFollowTimestamp( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOriginalFollowTimestampParams](https://portal.thirdweb.com/references/typescript/v5/GetOriginalFollowTimestampParams)>, ): Promise; ` ### Parameters ##### options The options for the getOriginalFollowTimestamp function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOriginalFollowTimestampParams](https://portal.thirdweb.com/references/typescript/v5/GetOriginalFollowTimestampParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getProfileIdAllowedToRecover Calls the "getProfileIdAllowedToRecover" function on the contract. ### Example `import { getProfileIdAllowedToRecover } from "thirdweb/extensions/lens"; const result = await getProfileIdAllowedToRecover({ contract, followTokenId: ..., }); ` ##### Signature `function getProfileIdAllowedToRecover( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileIdAllowedToRecoverParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileIdAllowedToRecoverParams)>, ): Promise; ` ### Parameters ##### options The options for the getProfileIdAllowedToRecover function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileIdAllowedToRecoverParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileIdAllowedToRecoverParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getProfileIdByHandleHash Calls the "getProfileIdByHandleHash" function on the contract. ### Example `import { getProfileIdByHandleHash } from "thirdweb/extensions/lens"; const result = await getProfileIdByHandleHash({ contract, handleHash: ..., }); ` ##### Signature `function getProfileIdByHandleHash( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileIdByHandleHashParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileIdByHandleHashParams)>, ): Promise; ` ### Parameters ##### options The options for the getProfileIdByHandleHash function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetProfileIdByHandleHashParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileIdByHandleHashParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getProfileMetadata Download user lens profile from Arweave This method does NOT give you the user handle & join-time - consider using `getFullProfileData` instead It is useful & cost efficient if you only want to get user's name, bio, picture, coverPicture etc. ### Example `import { getProfileMetadata } from "thirdweb/extensions/lens"; const profileData = await getProfileMetadata({ profileId, client }); if (profileData) { console.log("Display name: ", profileData.lens.name); console.log("Bio: ", profileData.lens.bio); } ` ##### Signature `function getProfileMetadata( options: [GetProfileMetadataParams](https://portal.thirdweb.com/references/typescript/v5/GetProfileMetadataParams), ): Promise; ` ### Parameters ##### options #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHubAddress?: string }; profileId: bigint; }; ` ### Returns ##### Return Type `let returnType: { lens: { appId?: string; attributes: Array; bio: string; coverPicture: string; id: string; name: string; picture: string; }; signature: string; }; ` LensProfileSchema | null ## getTokenId Calls the "getTokenId" function on the contract. ### Example `import { getTokenId } from "thirdweb/extensions/lens"; const result = await getTokenId({ contract, localName: ..., }); ` ##### Signature `function getTokenId( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetTokenIdParams](https://portal.thirdweb.com/references/typescript/v5/GetTokenIdParams)>, ): Promise; ` ### Parameters ##### options The options for the getTokenId function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetTokenIdParams](https://portal.thirdweb.com/references/typescript/v5/GetTokenIdParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getPublication Calls the "getPublication" function on the contract. ### Example `import { getPublication } from "thirdweb/extensions/lens"; const result = await getPublication({ contract, profileId: ..., pubId: ..., }); ` ##### Signature `function getPublication( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublicationParams](https://portal.thirdweb.com/references/typescript/v5/GetPublicationParams)>, ): Promise<{ __DEPRECATED__collectModule: string; __DEPRECATED__collectNFT: string; contentURI: string; pointedProfileId: bigint; pointedPubId: bigint; pubType: number; referenceModule: string; rootProfileId: bigint; rootPubId: bigint; }>; ` ### Parameters ##### options The options for the getPublication function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublicationParams](https://portal.thirdweb.com/references/typescript/v5/GetPublicationParams)>; ` ### Returns ##### Return Type `let returnType: Promise<{ __DEPRECATED__collectModule: string; __DEPRECATED__collectNFT: string; contentURI: string; pointedProfileId: bigint; pointedPubId: bigint; pubType: number; referenceModule: string; rootProfileId: bigint; rootPubId: bigint; }>; ` The parsed result of the function call. ## isFollowing Calls the "isFollowing" function on the contract. ### Example `import { isFollowing } from "thirdweb/extensions/lens"; const result = await isFollowing({ contract, followerProfileId: ..., }); ` ##### Signature `function isFollowing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsFollowingParams](https://portal.thirdweb.com/references/typescript/v5/IsFollowingParams)>, ): Promise; ` ### Parameters ##### options The options for the isFollowing function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsFollowingParams](https://portal.thirdweb.com/references/typescript/v5/IsFollowingParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isErc20CurrencyRegistered Calls the "isErc20CurrencyRegistered" function on the contract. ### Example `import { isErc20CurrencyRegistered } from "thirdweb/extensions/lens"; const result = await isErc20CurrencyRegistered({ contract, currencyAddress: ..., }); ` ##### Signature `function isErc20CurrencyRegistered( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsErc20CurrencyRegisteredParams](https://portal.thirdweb.com/references/typescript/v5/IsErc20CurrencyRegisteredParams)>, ): Promise; ` ### Parameters ##### options The options for the isErc20CurrencyRegistered function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsErc20CurrencyRegisteredParams](https://portal.thirdweb.com/references/typescript/v5/IsErc20CurrencyRegisteredParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isModuleRegistered Calls the "isModuleRegistered" function on the contract. ### Example `import { isModuleRegistered } from "thirdweb/extensions/lens"; const result = await isModuleRegistered({ contract, moduleAddress: ..., }); ` ##### Signature `function isModuleRegistered( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsModuleRegisteredParams](https://portal.thirdweb.com/references/typescript/v5/IsModuleRegisteredParams)>, ): Promise; ` ### Parameters ##### options The options for the isModuleRegistered function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsModuleRegisteredParams](https://portal.thirdweb.com/references/typescript/v5/IsModuleRegisteredParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isModuleRegisteredAs Calls the "isModuleRegisteredAs" function on the contract. ### Example `import { isModuleRegisteredAs } from "thirdweb/extensions/lens"; const result = await isModuleRegisteredAs({ contract, moduleAddress: ..., moduleType: ..., }); ` ##### Signature `function isModuleRegisteredAs( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsModuleRegisteredAsParams](https://portal.thirdweb.com/references/typescript/v5/IsModuleRegisteredAsParams)>, ): Promise; ` ### Parameters ##### options The options for the isModuleRegisteredAs function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsModuleRegisteredAsParams](https://portal.thirdweb.com/references/typescript/v5/IsModuleRegisteredAsParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## mintTimestampOf Calls the "mintTimestampOf" function on the contract. ### Example `import { mintTimestampOf } from "thirdweb/extensions/lens"; const result = await mintTimestampOf({ contract, tokenId: ..., }); ` ##### Signature `function mintTimestampOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintTimestampOfParams](https://portal.thirdweb.com/references/typescript/v5/MintTimestampOfParams)>, ): Promise; ` ### Parameters ##### options The options for the mintTimestampOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintTimestampOfParams](https://portal.thirdweb.com/references/typescript/v5/MintTimestampOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## mintTimestampOfFollowNFT Calls the "mintTimestampOf" function on the contract. ### Example `import { mintTimestampOf } from "thirdweb/extensions/lens"; const result = await mintTimestampOf({ contract, tokenId: ..., }); ` ##### Signature `function mintTimestampOfFollowNFT( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintTimestampOfParams](https://portal.thirdweb.com/references/typescript/v5/MintTimestampOfParams)>, ): Promise; ` ### Parameters ##### options The options for the mintTimestampOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MintTimestampOfParams](https://portal.thirdweb.com/references/typescript/v5/MintTimestampOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## resolveAddress Take in a Lens handle or local-name and return the wallet address behind that handle/local-name. For example, "lens/vitalik" is a handle, with "lens" being the namespace and "vitalik" being the local name ### Example `import { resolveAddress } from "thirdweb/extensions/lens"; const walletAddress = await resolveAddress({ name: "vitalik", client, }); ` ##### Signature `function resolveAddress( options: [ResolveLensAddressParams](https://portal.thirdweb.com/references/typescript/v5/ResolveLensAddressParams), ): Promise; ` ### Parameters ##### options #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; overrides?: { chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); lensHandleContractAddress?: string }; }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## nonces Calls the "nonces" function on the contract. ### Example `import { nonces } from "thirdweb/extensions/lens"; const result = await nonces({ contract, signer: ..., }); ` ##### Signature `function nonces( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NoncesParams](https://portal.thirdweb.com/references/typescript/v5/NoncesParams)>, ): Promise; ` ### Parameters ##### options The options for the nonces function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NoncesParams](https://portal.thirdweb.com/references/typescript/v5/NoncesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## resolve Calls the "resolve" function on the contract. ### Example `import { resolve } from "thirdweb/extensions/lens"; const result = await resolve({ contract, handleId: ..., }); ` ##### Signature `function resolve( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ResolveParams](https://portal.thirdweb.com/references/typescript/v5/ResolveParams)>, ): Promise; ` ### Parameters ##### options The options for the resolve function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ResolveParams](https://portal.thirdweb.com/references/typescript/v5/ResolveParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## tokenDataOf Calls the "tokenDataOf" function on the contract. ### Example `import { tokenDataOf } from "thirdweb/extensions/lens"; const result = await tokenDataOf({ contract, tokenId: ..., }); ` ##### Signature `function tokenDataOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenDataOfParams](https://portal.thirdweb.com/references/typescript/v5/TokenDataOfParams)>, ): Promise<{ mintTimestamp: bigint; owner: string }>; ` ### Parameters ##### options The options for the tokenDataOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenDataOfParams](https://portal.thirdweb.com/references/typescript/v5/TokenDataOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise<{ mintTimestamp: bigint; owner: string }>; ` The parsed result of the function call. ## lightTheme Create a custom light theme object by using the default dark theme as a base and applying overrides. ### Example #### Get the default light theme `const defaultLightTheme = lightTheme(); ` #### Create a custom light theme `const customTheme = lightTheme({ colors: { modalBg: "red", }, }); ` ##### Signature `function lightTheme(overrides?: [ThemeOverrides](https://portal.thirdweb.com/references/typescript/v5/ThemeOverrides)): [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Parameters ##### overrides optional The overrides to apply to the default light theme. #### Type `let overrides: { [key in Exclude]: Partial<[Theme](https://portal.thirdweb.com/references/typescript/v5/Theme)[key]>; }; ` ### Returns ##### Return Type `let returnType: { colors: { accentButtonBg: string; accentButtonText: string; accentText: string; borderColor: string; connectedButtonBg: string; connectedButtonBgHover: string; danger: string; inputAutofillBg: string; modalBg: string; modalOverlayBg: string; primaryButtonBg: string; primaryButtonText: string; primaryText: string; scrollbarBg: string; secondaryButtonBg: string; secondaryButtonHoverBg: string; secondaryButtonText: string; secondaryIconColor: string; secondaryIconHoverBg: string; secondaryIconHoverColor: string; secondaryText: string; selectedTextBg: string; selectedTextColor: string; separatorLine: string; skeletonBg: string; success: string; tertiaryBg: string; tooltipBg: string; tooltipText: string; }; fontFamily: string; type: "light" | "dark"; }; ` Theme object ## linkProfile Connects a new profile (and new authentication method) to the current user. Requires a connected in-app or ecosystem account. _When a profile is linked to the account, that profile can then be used to sign into the same account._ ### Example `import { linkProfile } from "thirdweb/wallets"; // optionally specify the ecosystem if you're linking an ecosystem wallet await linkProfile({ client, strategy: "discord" }); ` ##### Signature `function linkProfile(args: AuthArgsType): Promise>; ` ### Parameters ##### args #### Type `let args: AuthArgsType; ` ### Returns ##### Return Type `let returnType: { details: { address?: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); email?: string; id?: string; phone?: string; }; type: AuthOption; }; ` A promise that resolves to the currently linked profiles when the connection is successful. ## acceptOffer Accepts an offer after performing necessary checks and validations. Throws an error if the offer is not active, the offeror's balance is insufficient, or the offeror's allowance is insufficient. ### Example `import { acceptOffer } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const acceptOfferTx = acceptOffer({ contract, offerId: 1n, }); await sendTransaction({ transaction, account }); ` ##### Signature `function acceptOffer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AcceptOfferParams](https://portal.thirdweb.com/references/typescript/v5/AcceptOfferParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for accepting the offer. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[AcceptOfferParams](https://portal.thirdweb.com/references/typescript/v5/AcceptOfferParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction object that can be sent to accept the offer. ## approveBuyerForListing Prepares a transaction to call the "approveBuyerForListing" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { approveBuyerForListing } from "thirdweb/extensions/marketplace"; const transaction = approveBuyerForListing({ contract, listingId: ..., buyer: ..., toApprove: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function approveBuyerForListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ApproveBuyerForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveBuyerForListingParams) | { asyncParams: () => Promise<[ApproveBuyerForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveBuyerForListingParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "approveBuyerForListing" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ApproveBuyerForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveBuyerForListingParams) | { asyncParams: () => Promise<[ApproveBuyerForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveBuyerForListingParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## acceptedOfferEvent Creates an event object for the AcceptedOffer event. ### Example `import { getContractEvents } from "thirdweb"; import { acceptedOfferEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ acceptedOfferEvent({ offeror: ..., offerId: ..., assetContract: ..., }) ], }); ` ##### Signature `function acceptedOfferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "seller"; readonly type: "address" }, { readonly name: "quantityBought"; readonly type: "uint256" }, { readonly name: "totalPricePaid"; readonly type: "uint256" }, ]; readonly name: "AcceptedOffer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "seller"; readonly type: "address" }, { readonly name: "quantityBought"; readonly type: "uint256" }, { readonly name: "totalPricePaid"; readonly type: "uint256" }, ]; readonly name: "AcceptedOffer"; readonly type: "event"; }>; ` The prepared event object. ## approveCurrencyForListing Prepares a transaction to call the "approveCurrencyForListing" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { approveCurrencyForListing } from "thirdweb/extensions/marketplace"; const transaction = approveCurrencyForListing({ contract, listingId: ..., currency: ..., pricePerTokenInCurrency: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function approveCurrencyForListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ApproveCurrencyForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveCurrencyForListingParams) | { asyncParams: () => Promise<[ApproveCurrencyForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveCurrencyForListingParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "approveCurrencyForListing" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ApproveCurrencyForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveCurrencyForListingParams) | { asyncParams: () => Promise<[ApproveCurrencyForListingParams](https://portal.thirdweb.com/references/typescript/v5/ApproveCurrencyForListingParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## bidInAuction Places a bid in an English auction. ### Example `import { bidInAuction } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = bidInAuction({ contract, auctionId: 0n, bidAmount: "100", }); await sendTransaction({ transaction, account }); ` ##### Signature `function bidInAuction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BidInAuctionParams](https://portal.thirdweb.com/references/typescript/v5/BidInAuctionParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for placing the bid. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BidInAuctionParams](https://portal.thirdweb.com/references/typescript/v5/BidInAuctionParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that can be sent to place the bid. ## auctionClosedEvent Creates an event object for the AuctionClosed event. ### Example `import { getContractEvents } from "thirdweb"; import { auctionClosedEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ auctionClosedEvent({ auctionId: ..., assetContract: ..., closer: ..., }) ], }); ` ##### Signature `function auctionClosedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly indexed: true; readonly name: "closer"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "winningBidder"; readonly type: "address" }, ]; readonly name: "AuctionClosed"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly indexed: true; readonly name: "closer"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "winningBidder"; readonly type: "address" }, ]; readonly name: "AuctionClosed"; readonly type: "event"; }>; ` The prepared event object. ## buyoutAuction Buys out an English auction. ### Example `import { buyoutAuction } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = buyoutAuction({ contract, auctionId: 0n, }); await sendTransaction({ transaction, account }); ` ##### Signature `function buyoutAuction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BuyoutAuctionParams](https://portal.thirdweb.com/references/typescript/v5/BuyoutAuctionParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for buying out the auction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BuyoutAuctionParams](https://portal.thirdweb.com/references/typescript/v5/BuyoutAuctionParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that can be sent to buy out the auction. ## cancelListing Prepares a transaction to call the "cancelListing" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { cancelListing } from "thirdweb/extensions/marketplace"; const transaction = cancelListing({ contract, listingId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function cancelListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CancelListingParams](https://portal.thirdweb.com/references/typescript/v5/CancelListingParams) | { asyncParams: () => Promise<[CancelListingParams](https://portal.thirdweb.com/references/typescript/v5/CancelListingParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "cancelListing" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CancelListingParams](https://portal.thirdweb.com/references/typescript/v5/CancelListingParams) | { asyncParams: () => Promise<[CancelListingParams](https://portal.thirdweb.com/references/typescript/v5/CancelListingParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getInitializeTransaction Prepares the initialization transaction for a contract deployment ##### Signature `function getInitializeTransaction(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); deployMetadata: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); implementationContract: Readonly; initializeParams?: Record; modules?: Array<{ deployMetadata: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); initializeParams?: Record; }>; }): Promise< [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)<[], AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions)> >; ` ### Parameters ##### options The options for generating the initialize transaction #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); deployMetadata: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); implementationContract: Readonly; initializeParams?: Record; modules?: Array<{ deployMetadata: [FetchDeployMetadataResult](https://portal.thirdweb.com/references/typescript/v5/FetchDeployMetadataResult); initializeParams?: Record; }>; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` The prepared transaction for contract initialization ## cancelAuction Cancels an auction by providing the necessary options. ### Example `import { cancelAuction } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = cancelAuction({ contract, auctionId: 0n, }); await sendTransaction({ transaction, account }); ` ##### Signature `function cancelAuction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CancelAuctionParams](https://portal.thirdweb.com/references/typescript/v5/CancelAuctionParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for canceling the auction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CancelAuctionParams](https://portal.thirdweb.com/references/typescript/v5/CancelAuctionParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that can be sent to cancel the auction. ## cancelOffer Prepares a transaction to call the "cancelOffer" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { cancelOffer } from "thirdweb/extensions/marketplace"; const transaction = cancelOffer({ contract, offerId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function cancelOffer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CancelOfferParams](https://portal.thirdweb.com/references/typescript/v5/CancelOfferParams) | { asyncParams: () => Promise<[CancelOfferParams](https://portal.thirdweb.com/references/typescript/v5/CancelOfferParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "cancelOffer" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CancelOfferParams](https://portal.thirdweb.com/references/typescript/v5/CancelOfferParams) | { asyncParams: () => Promise<[CancelOfferParams](https://portal.thirdweb.com/references/typescript/v5/CancelOfferParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## cancelledAuctionEvent Creates an event object for the CancelledAuction event. ### Example `import { getContractEvents } from "thirdweb"; import { cancelledAuctionEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ cancelledAuctionEvent({ auctionCreator: ..., auctionId: ..., }) ], }); ` ##### Signature `function cancelledAuctionEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, ]; readonly name: "CancelledAuction"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, ]; readonly name: "CancelledAuction"; readonly type: "event"; }>; ` The prepared event object. ## cancelledOfferEvent Creates an event object for the CancelledOffer event. ### Example `import { getContractEvents } from "thirdweb"; import { cancelledOfferEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ cancelledOfferEvent({ offeror: ..., offerId: ..., }) ], }); ` ##### Signature `function cancelledOfferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, ]; readonly name: "CancelledOffer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, ]; readonly name: "CancelledOffer"; readonly type: "event"; }>; ` The prepared event object. ## cancelledListingEvent Creates an event object for the CancelledListing event. ### Example `import { getContractEvents } from "thirdweb"; import { cancelledListingEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ cancelledListingEvent({ listingCreator: ..., listingId: ..., }) ], }); ` ##### Signature `function cancelledListingEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, ]; readonly name: "CancelledListing"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, ]; readonly name: "CancelledListing"; readonly type: "event"; }>; ` The prepared event object. ## collectAuctionTokens Prepares a transaction to call the "collectAuctionTokens" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { collectAuctionTokens } from "thirdweb/extensions/marketplace"; const transaction = collectAuctionTokens({ contract, auctionId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function collectAuctionTokens( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CollectAuctionTokensParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionTokensParams) | { asyncParams: () => Promise<[CollectAuctionTokensParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionTokensParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "collectAuctionTokens" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CollectAuctionTokensParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionTokensParams) | { asyncParams: () => Promise<[CollectAuctionTokensParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionTokensParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## createAuction Creates an auction. ### Example `import { createAuction } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = createAuction({...}); await sendTransaction({ transaction, account }); ` ##### Signature `function createAuction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateAuctionParams](https://portal.thirdweb.com/references/typescript/v5/CreateAuctionParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for creating the auction. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateAuctionParams](https://portal.thirdweb.com/references/typescript/v5/CreateAuctionParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The result of creating the auction. ## createListing Creates a direct listing. ### Example `import { createListing } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = createListing({ assetContractAddress: "0x...", // the NFT contract address that you want to sell tokenId={0n}, // the token id you want to sell pricePerToken="0.1" // sell for 0.1 }); await sendTransaction({ transaction, account }); ` ##### Signature `function createListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateListingParams](https://portal.thirdweb.com/references/typescript/v5/CreateListingParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for creating the direct listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateListingParams](https://portal.thirdweb.com/references/typescript/v5/CreateListingParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The result of creating the direct listing. ## collectAuctionPayout Prepares a transaction to call the "collectAuctionPayout" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { collectAuctionPayout } from "thirdweb/extensions/marketplace"; const transaction = collectAuctionPayout({ contract, auctionId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function collectAuctionPayout( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CollectAuctionPayoutParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionPayoutParams) | { asyncParams: () => Promise<[CollectAuctionPayoutParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionPayoutParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "collectAuctionPayout" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CollectAuctionPayoutParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionPayoutParams) | { asyncParams: () => Promise<[CollectAuctionPayoutParams](https://portal.thirdweb.com/references/typescript/v5/CollectAuctionPayoutParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## currencyApprovedForListingEvent Creates an event object for the CurrencyApprovedForListing event. ### Example `import { getContractEvents } from "thirdweb"; import { currencyApprovedForListingEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ currencyApprovedForListingEvent({ listingId: ..., currency: ..., }) ], }); ` ##### Signature `function currencyApprovedForListingEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "currency"; readonly type: "address"; }, { readonly name: "pricePerToken"; readonly type: "uint256" }, ]; readonly name: "CurrencyApprovedForListing"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "currency"; readonly type: "address"; }, { readonly name: "pricePerToken"; readonly type: "uint256" }, ]; readonly name: "CurrencyApprovedForListing"; readonly type: "event"; }>; ` The prepared event object. ## currencyPriceForListing Retrieves the currency price for a listing. ### Example `import { currencyPriceForListing } from "thirdweb/extensions/marketplace"; const price = await currencyPriceForListing({ contract, listingId: 1n, currency: "0x...", }); ` ##### Signature `function currencyPriceForListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CurrencyPriceForListingParams](https://portal.thirdweb.com/references/typescript/v5/CurrencyPriceForListingParams)>, ): Promise; ` ### Parameters ##### options The options for retrieving the currency price. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CurrencyPriceForListingParams](https://portal.thirdweb.com/references/typescript/v5/CurrencyPriceForListingParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the currency price as a bigint. ## deployMarketplaceContract Deploys a marketplace contract. ### Example `import { deployMarketplaceContract } from "thirdweb/deploys"; const address = await deployMarketplaceContract({ client, chain, account, params: { name: "MarketplaceV3", description: "MarketplaceV3 deployed using thirdweb SDK", platformFeeRecipient: "0x21d514c90ee4E4e4Cd16Ce9185BF01F0F1eE4A04", platformFeeBps: 1000, }, }); ` ##### Signature `function deployMarketplaceContract(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [MarketplaceContractParams](https://portal.thirdweb.com/references/typescript/v5/MarketplaceContractParams); version?: string; }): Promise; ` ### Parameters ##### options The options for deploying the marketplace contract. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); params: [MarketplaceContractParams](https://portal.thirdweb.com/references/typescript/v5/MarketplaceContractParams); version?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## executeSale Executes a sale for an English auction. ### Example `import { executeSale } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = executeSale({ contract, auctionId: 0n, }); await sendTransaction({ transaction, account }); ` ##### Signature `function executeSale( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ExecuteSaleParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteSaleParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for executing the sale. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ExecuteSaleParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteSaleParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that can be sent to execute the sale. ## getAllAuctions Retrieves all auctions based on the provided options. ### Example `import { getAllAuctions } from "thirdweb/extensions/marketplace"; const listings = await getAllAuctions({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllAuctions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAllAuctionParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the auctions. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAllAuctionParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; buyoutCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; minimumBidCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction"; }; ` A promise that resolves to the auctions array. ## buyFromListing Buys a listing from the marketplace. ### Example `import { buyFromListing } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = buyFromListing({ contract, listingId: 1n, quantity: 1n, recipient: "0x...", }); await sendTransaction({ transaction, account }); ` When using `buyFromListing` with Pay, the `erc20Value` will be automatically set to the listing currency. ##### Signature `function buyFromListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BuyFromListingParams](https://portal.thirdweb.com/references/typescript/v5/BuyFromListingParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for buying from a listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[BuyFromListingParams](https://portal.thirdweb.com/references/typescript/v5/BuyFromListingParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the transaction result. ## getAllListings Retrieves all direct listings based on the provided options. ### Example `import { getAllListings } from "thirdweb/extensions/marketplace"; const listings = await getAllListings({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllListings( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllListingParams](https://portal.thirdweb.com/references/typescript/v5/GetAllListingParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllListingParams](https://portal.thirdweb.com/references/typescript/v5/GetAllListingParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; creatorAddress: Address; currencyContractAddress: Address; currencyValuePerToken: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; isReservedListing: boolean; pricePerToken: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; tokenId: bigint; type: "direct-listing"; }; ` A promise that resolves to the direct listings array. ## getAllOffers Retrieves all offers based on the provided options. ### Example `import { getAllOffers } from "thirdweb/extensions/marketplace"; const listings = await getAllOffers({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllOffers( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllOffersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllOffersParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the offers. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllOffersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllOffersParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; currencyContractAddress: Address; currencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; offerorAddress: Address; quantity: bigint; status: ListingStatus; tokenId: bigint; totalPrice: bigint; }; ` A promise that resolves to the offers array. ## getAllValidAuctions Retrieves all valid auctions based on the provided options. ### Example `import { getAllValidAuctions } from "thirdweb/extensions/marketplace"; const validAuctions = await getAllValidAuctions({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllValidAuctions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidAuctionParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidAuctionParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; buyoutCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; minimumBidCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction"; }; ` A promise that resolves to the valid auctions array. ## getAllValidListings Retrieves all valid direct listings based on the provided options. ### Example `import { getAllValidListings } from "thirdweb/extensions/marketplace"; const validListings = await getAllValidListings({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllValidListings( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidListingParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidListingParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the valid listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidListingParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidListingParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; creatorAddress: Address; currencyContractAddress: Address; currencyValuePerToken: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; isReservedListing: boolean; pricePerToken: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; tokenId: bigint; type: "direct-listing"; }; ` A promise that resolves to the direct listings array. ## getAllValidOffers Retrieves all valid offers based on the provided options. ### Example `import { getAllValidOffers } from "thirdweb/extensions/marketplace"; const validOffers = await getAllValidOffers({ contract, start: 0, count: 10, }); ` ##### Signature `function getAllValidOffers( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidOffersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidOffersParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving the valid offers. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllValidOffersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllValidOffersParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; currencyContractAddress: Address; currencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; offerorAddress: Address; quantity: bigint; status: ListingStatus; tokenId: bigint; totalPrice: bigint; }; ` A promise that resolves to the offers array. ## getAuction Retrieves an auction listing based on the provided options. ### Example `import { getListing } from "thirdweb/extensions/marketplace"; const listing = await getListing({ contract, listingId: 1n }); ` ##### Signature `function getAuction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAuctionParams)>, ): Promise<[EnglishAuction](https://portal.thirdweb.com/references/typescript/v5/EnglishAuction)>; ` ### Parameters ##### options The options for retrieving the listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAuctionParams](https://portal.thirdweb.com/references/typescript/v5/GetAuctionParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; bidBufferBps: bigint; buyoutBidAmount: bigint; buyoutCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); creatorAddress: Address; currencyContractAddress: Address; endTimeInSeconds: bigint; id: bigint; minimumBidAmount: bigint; minimumBidCurrencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; timeBufferInSeconds: bigint; tokenId: bigint; type: "english-auction"; }; ` A promise that resolves to the direct listing. ## getListing Retrieves a direct listing based on the provided options. ### Example `import { getListing } from "thirdweb/extensions/marketplace"; const listing = await getListing({ contract, listingId: 1n }); ` ##### Signature `function getListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetListingParams](https://portal.thirdweb.com/references/typescript/v5/GetListingParams)>, ): Promise<[DirectListing](https://portal.thirdweb.com/references/typescript/v5/DirectListing)>; ` ### Parameters ##### options The options for retrieving the listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetListingParams](https://portal.thirdweb.com/references/typescript/v5/GetListingParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; creatorAddress: Address; currencyContractAddress: Address; currencyValuePerToken: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; isReservedListing: boolean; pricePerToken: bigint; quantity: bigint; startTimeInSeconds: bigint; status: ListingStatus; tokenId: bigint; type: "direct-listing"; }; ` A promise that resolves to the direct listing. ## getWinningBid Retrieves the winning bid information for a given auction. ### Example `import { getWinningBid } from "thirdweb/extensions/marketplace"; const winningBid = await getWinningBid({ contract, auctionId: 0n, }); ` ##### Signature `function getWinningBid( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetWinningBidParams](https://portal.thirdweb.com/references/typescript/v5/GetWinningBidParams)>, ): Promise< | undefined | { bidAmountWei: bigint; bidderAddress: string; currencyAddress: string; currencyValue: CurrencyValue; } >; ` ### Parameters ##### options The options for retrieving the winning bid. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetWinningBidParams](https://portal.thirdweb.com/references/typescript/v5/GetWinningBidParams)>; ` ### Returns ##### Return Type `let returnType: Promise< | undefined | { bidAmountWei: bigint; bidderAddress: string; currencyAddress: string; currencyValue: CurrencyValue; } >; ` The winning bid information, or undefined if there is no winning bid. ## isBidInAuctionSupported Checks if the `bidInAuction` method is supported by the given contract. ### Example `import { isBidInAuctionSupported } from "thirdweb/extensions/marketplace"; const supported = isBidInAuctionSupported(["0x..."]); ` ##### Signature `function isBidInAuctionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `bidInAuction` method is supported. ## isBuyFromListingSupported Checks if the `buyFromListing` method is supported by the given contract. ### Example `import { isBuyFromListingSupported } from "thirdweb/extensions/marketplace"; const supported = isBuyFromListingSupported(["0x..."]); ` ##### Signature `function isBuyFromListingSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `buyFromListing` method is supported. ## isCancelListingSupported Checks if the `cancelListing` method is supported by the given contract. ### Example `import { isCancelListingSupported } from "thirdweb/extensions/marketplace"; const supported = isCancelListingSupported(["0x..."]); ` ##### Signature `function isCancelListingSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `cancelListing` method is supported. ## isBuyerApprovedForListing Checks if the buyer is approved for a listing. ### Example `import { isBuyerApprovedForListing } from "thirdweb/extensions/marketplace"; const isApproved = await isBuyerApprovedForListing({ contract, listingId: 1n, buyer: "0x...", }); ` ##### Signature `function isBuyerApprovedForListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsBuyerApprovedForListingParams](https://portal.thirdweb.com/references/typescript/v5/IsBuyerApprovedForListingParams)>, ): Promise; ` ### Parameters ##### options The options for checking buyer approval. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsBuyerApprovedForListingParams](https://portal.thirdweb.com/references/typescript/v5/IsBuyerApprovedForListingParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to a boolean indicating whether the buyer is approved for the listing. ## isCancelAuctionSupported Checks if the `cancelAuction` method is supported by the given contract. ### Example `import { isCancelAuctionSupported } from "thirdweb/extensions/marketplace"; const supported = isCancelAuctionSupported(["0x..."]); ` ##### Signature `function isCancelAuctionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `cancelAuction` method is supported. ## isCreateAuctionSupported Checks if the `createAuction` method is supported by the given contract. ### Example `import { isCreateAuctionSupported } from "thirdweb/extensions/marketplace"; const supported = isCreateAuctionSupported(["0x..."]); ` ##### Signature `function isCreateAuctionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `createAuction` method is supported. ## isCreateListingSupported Checks if the `createListing` method is supported by the given contract. ### Example `import { isCreateAuctionSupported } from "thirdweb/extensions/marketplace"; const supported = isCreateAuctionSupported(["0x..."]); ` ##### Signature `function isCreateListingSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `createListing` method is supported. ## isCurrencyApprovedForListing Calls the "isCurrencyApprovedForListing" function on the contract. ### Example `import { isCurrencyApprovedForListing } from "thirdweb/extensions/marketplace"; const result = await isCurrencyApprovedForListing({ contract, listingId: ..., currency: ..., }); ` ##### Signature `function isCurrencyApprovedForListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsCurrencyApprovedForListingParams](https://portal.thirdweb.com/references/typescript/v5/IsCurrencyApprovedForListingParams)>, ): Promise; ` ### Parameters ##### options The options for the isCurrencyApprovedForListing function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsCurrencyApprovedForListingParams](https://portal.thirdweb.com/references/typescript/v5/IsCurrencyApprovedForListingParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isGetListingSupported Checks if the `isGetListingSupported` method is supported by the given contract. ### Example `import { isGetListingSupported } from "thirdweb/extensions/marketplace"; const supported = isGetListingSupported(["0x..."]); ` ##### Signature `function isGetListingSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `isGetListingSupported` method is supported. ## isGetAuctionSupported Checks if the `getAuction` method is supported by the given contract. ### Example `import { isGetAuctionSupported } from "thirdweb/extensions/marketplace"; const supported = isGetAuctionSupported(["0x..."]); ` ##### Signature `function isGetAuctionSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAuction` method is supported. ## isGetWinningBidSupported Checks if the `getWinningBid` method is supported by the given contract. ### Example `import { isGetWinningBidSupported } from "thirdweb/extensions/marketplace"; const supported = isGetWinningBidSupported(["0x..."]); ` ##### Signature `function isGetWinningBidSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getWinningBid` method is supported. ## isNewWinningBid Calls the "isNewWinningBid" function on the contract. ### Example `import { isNewWinningBid } from "thirdweb/extensions/marketplace"; const result = await isNewWinningBid({ contract, auctionId: ..., bidAmount: ..., }); ` ##### Signature `function isNewWinningBid( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsNewWinningBidParams](https://portal.thirdweb.com/references/typescript/v5/IsNewWinningBidParams)>, ): Promise; ` ### Parameters ##### options The options for the isNewWinningBid function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsNewWinningBidParams](https://portal.thirdweb.com/references/typescript/v5/IsNewWinningBidParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## buyerApprovedForListingEvent Creates an event object for the BuyerApprovedForListing event. ### Example `import { getContractEvents } from "thirdweb"; import { buyerApprovedForListingEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ buyerApprovedForListingEvent({ listingId: ..., buyer: ..., }) ], }); ` ##### Signature `function buyerApprovedForListingEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "buyer"; readonly type: "address"; }, { readonly name: "approved"; readonly type: "bool" }, ]; readonly name: "BuyerApprovedForListing"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "buyer"; readonly type: "address"; }, { readonly name: "approved"; readonly type: "bool" }, ]; readonly name: "BuyerApprovedForListing"; readonly type: "event"; }>; ` The prepared event object. ## newAuctionEvent Creates an event object for the NewAuction event. ### Example `import { getContractEvents } from "thirdweb"; import { newAuctionEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ newAuctionEvent({ auctionCreator: ..., auctionId: ..., assetContract: ..., }) ], }); ` ##### Signature `function newAuctionEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "auctionId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "minimumBidAmount"; readonly type: "uint256"; }, { readonly name: "buyoutBidAmount"; readonly type: "uint256"; }, { readonly name: "timeBufferInSeconds"; readonly type: "uint64"; }, { readonly name: "bidBufferBps"; readonly type: "uint64" }, { readonly name: "startTimestamp"; readonly type: "uint64" }, { readonly name: "endTimestamp"; readonly type: "uint64" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "auction"; readonly type: "tuple"; }, ]; readonly name: "NewAuction"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "auctionId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "minimumBidAmount"; readonly type: "uint256"; }, { readonly name: "buyoutBidAmount"; readonly type: "uint256"; }, { readonly name: "timeBufferInSeconds"; readonly type: "uint64"; }, { readonly name: "bidBufferBps"; readonly type: "uint64" }, { readonly name: "startTimestamp"; readonly type: "uint64" }, { readonly name: "endTimestamp"; readonly type: "uint64" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "auction"; readonly type: "tuple"; }, ]; readonly name: "NewAuction"; readonly type: "event"; }>; ` The prepared event object. ## getOffer Retrieves an offer based on the provided options. ### Example `import { getOffer } from "thirdweb/extensions/marketplace"; const listing = await getOffer({ contract, listingId: 1n }); ` ##### Signature `function getOffer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOfferParams](https://portal.thirdweb.com/references/typescript/v5/GetOfferParams)>, ): Promise<[Offer](https://portal.thirdweb.com/references/typescript/v5/Offer)>; ` ### Parameters ##### options The options for retrieving the offer. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetOfferParams](https://portal.thirdweb.com/references/typescript/v5/GetOfferParams)>; ` ### Returns ##### Return Type `let returnType: { asset: [NFT](https://portal.thirdweb.com/references/typescript/v5/NFT); assetContractAddress: Address; currencyContractAddress: Address; currencyValue: [GetBalanceResult](https://portal.thirdweb.com/references/typescript/v5/GetBalanceResult); endTimeInSeconds: bigint; id: bigint; offerorAddress: Address; quantity: bigint; status: ListingStatus; tokenId: bigint; totalPrice: bigint; }; ` A promise that resolves to the offer. ## newListingEvent Creates an event object for the NewListing event. ### Example `import { getContractEvents } from "thirdweb"; import { newListingEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ newListingEvent({ listingCreator: ..., listingId: ..., assetContract: ..., }) ], }); ` ##### Signature `function newListingEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "listingId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "startTimestamp"; readonly type: "uint128" }, { readonly name: "endTimestamp"; readonly type: "uint128" }, { readonly name: "listingCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, { readonly name: "reserved"; readonly type: "bool" }, ]; readonly name: "listing"; readonly type: "tuple"; }, ]; readonly name: "NewListing"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "listingId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "startTimestamp"; readonly type: "uint128" }, { readonly name: "endTimestamp"; readonly type: "uint128" }, { readonly name: "listingCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, { readonly name: "reserved"; readonly type: "bool" }, ]; readonly name: "listing"; readonly type: "tuple"; }, ]; readonly name: "NewListing"; readonly type: "event"; }>; ` The prepared event object. ## newBidEvent Creates an event object for the NewBid event. ### Example `import { getContractEvents } from "thirdweb"; import { newBidEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ newBidEvent({ auctionId: ..., bidder: ..., assetContract: ..., }) ], }); ` ##### Signature `function newBidEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "bidder"; readonly type: "address"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "bidAmount"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "auctionId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "minimumBidAmount"; readonly type: "uint256"; }, { readonly name: "buyoutBidAmount"; readonly type: "uint256"; }, { readonly name: "timeBufferInSeconds"; readonly type: "uint64"; }, { readonly name: "bidBufferBps"; readonly type: "uint64" }, { readonly name: "startTimestamp"; readonly type: "uint64" }, { readonly name: "endTimestamp"; readonly type: "uint64" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "auction"; readonly type: "tuple"; }, ]; readonly name: "NewBid"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "auctionId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "bidder"; readonly type: "address"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "bidAmount"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "auctionId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "minimumBidAmount"; readonly type: "uint256"; }, { readonly name: "buyoutBidAmount"; readonly type: "uint256"; }, { readonly name: "timeBufferInSeconds"; readonly type: "uint64"; }, { readonly name: "bidBufferBps"; readonly type: "uint64" }, { readonly name: "startTimestamp"; readonly type: "uint64" }, { readonly name: "endTimestamp"; readonly type: "uint64" }, { readonly name: "auctionCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "auction"; readonly type: "tuple"; }, ]; readonly name: "NewBid"; readonly type: "event"; }>; ` The prepared event object. ## newSaleEvent Creates an event object for the NewSale event. ### Example `import { getContractEvents } from "thirdweb"; import { newSaleEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ newSaleEvent({ listingCreator: ..., listingId: ..., assetContract: ..., }) ], }); ` ##### Signature `function newSaleEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "buyer"; readonly type: "address" }, { readonly name: "quantityBought"; readonly type: "uint256" }, { readonly name: "totalPricePaid"; readonly type: "uint256" }, ]; readonly name: "NewSale"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "buyer"; readonly type: "address" }, { readonly name: "quantityBought"; readonly type: "uint256" }, { readonly name: "totalPricePaid"; readonly type: "uint256" }, ]; readonly name: "NewSale"; readonly type: "event"; }>; ` The prepared event object. ## newOfferEvent Creates an event object for the NewOffer event. ### Example `import { getContractEvents } from "thirdweb"; import { newOfferEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ newOfferEvent({ offeror: ..., offerId: ..., assetContract: ..., }) ], }); ` ##### Signature `function newOfferEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "offerId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "totalPrice"; readonly type: "uint256" }, { readonly name: "expirationTimestamp"; readonly type: "uint256"; }, { readonly name: "offeror"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "offer"; readonly type: "tuple"; }, ]; readonly name: "NewOffer"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "offeror"; readonly type: "address"; }, { readonly indexed: true; readonly name: "offerId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "offerId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "totalPrice"; readonly type: "uint256" }, { readonly name: "expirationTimestamp"; readonly type: "uint256"; }, { readonly name: "offeror"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, ]; readonly name: "offer"; readonly type: "tuple"; }, ]; readonly name: "NewOffer"; readonly type: "event"; }>; ` The prepared event object. ## makeOffer Makes an offer for any asset (ERC721 or ERC1155). ### Example `import { makeOffer } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const offerTx = makeOffer({ contract, assetContractAddress: "0x1234567890123456789012345678901234567890", tokenId: 1n, currencyContractAddress: "0x1234567890123456789012345678901234567890", offerExpiresAt: new Date(Date.now() + 1000 * 60 * 60 * 24), totalOffer: "1.0", }); await sendTransaction({ transaction, account }); ` ##### Signature `function makeOffer( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MakeOfferParams](https://portal.thirdweb.com/references/typescript/v5/MakeOfferParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for making the offer. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[MakeOfferParams](https://portal.thirdweb.com/references/typescript/v5/MakeOfferParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction object that can be sent to make the offer. ## totalAuctions Calls the "totalAuctions" function on the contract. ### Example `import { totalAuctions } from "thirdweb/extensions/marketplace"; const result = await totalAuctions({ contract, }); ` ##### Signature `function totalAuctions( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalAuctions function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## totalListings Calls the "totalListings" function on the contract. ### Example `import { totalListings } from "thirdweb/extensions/marketplace"; const result = await totalListings({ contract, }); ` ##### Signature `function totalListings( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalListings function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## updatedListingEvent Creates an event object for the UpdatedListing event. ### Example `import { getContractEvents } from "thirdweb"; import { updatedListingEvent } from "thirdweb/extensions/marketplace"; const events = await getContractEvents({ contract, events: [ updatedListingEvent({ listingCreator: ..., listingId: ..., assetContract: ..., }) ], }); ` ##### Signature `function updatedListingEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "listingId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "startTimestamp"; readonly type: "uint128" }, { readonly name: "endTimestamp"; readonly type: "uint128" }, { readonly name: "listingCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, { readonly name: "reserved"; readonly type: "bool" }, ]; readonly name: "listing"; readonly type: "tuple"; }, ]; readonly name: "UpdatedListing"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "listingCreator"; readonly type: "address"; }, { readonly indexed: true; readonly name: "listingId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "assetContract"; readonly type: "address"; }, { readonly components: readonly [ { readonly name: "listingId"; readonly type: "uint256" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "quantity"; readonly type: "uint256" }, { readonly name: "pricePerToken"; readonly type: "uint256" }, { readonly name: "startTimestamp"; readonly type: "uint128" }, { readonly name: "endTimestamp"; readonly type: "uint128" }, { readonly name: "listingCreator"; readonly type: "address" }, { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "currency"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "status"; readonly type: "uint8" }, { readonly name: "reserved"; readonly type: "bool" }, ]; readonly name: "listing"; readonly type: "tuple"; }, ]; readonly name: "UpdatedListing"; readonly type: "event"; }>; ` The prepared event object. ## max Returns the maximum of two BigInt values. ### Example `max(1n, 2n); // 2n ` ##### Signature `function max(a: bigint, b: bigint): bigint; ` ### Parameters ##### a The first BigInt value. #### Type `let a: bigint; ` ##### b The second BigInt value. #### Type `let b: bigint; ` ### Returns ##### Return Type `let returnType: bigint; ` The larger of the two BigInt values. ## totalOffers Calls the "totalOffers" function on the contract. ### Example `import { totalOffers } from "thirdweb/extensions/marketplace"; const result = await totalOffers({ contract, }); ` ##### Signature `function totalOffers( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalOffers function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## updateListing Updates an existing direct listing. ### Example `import { updateListing } from "thirdweb/extensions/marketplace"; import { sendTransaction } from "thirdweb"; const transaction = updateListing({...}); await sendTransaction({ transaction, account }); ` ##### Signature `function updateListing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateListingParams](https://portal.thirdweb.com/references/typescript/v5/UpdateListingParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for updating the direct listing. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[UpdateListingParams](https://portal.thirdweb.com/references/typescript/v5/UpdateListingParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The result of updating the direct listing. ## getDefaultHandle Calls the "getDefaultHandle" function on the contract. ### Example `import { getDefaultHandle } from "thirdweb/extensions/lens"; const result = await getDefaultHandle({ contract, profileId: ..., }); ` ##### Signature `function getDefaultHandle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetDefaultHandleParams](https://portal.thirdweb.com/references/typescript/v5/GetDefaultHandleParams)>, ): Promise; ` ### Parameters ##### options The options for the getDefaultHandle function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetDefaultHandleParams](https://portal.thirdweb.com/references/typescript/v5/GetDefaultHandleParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { MintableERC1155 } from "thirdweb/modules"; const result = await MintableERC1155.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## generateMintSignature Generates a payload and signature for minting ERC1155 tokens with a signature. ### Example `import { MintableERC1155 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC1155.generateMintSignature({ account, contract, nft: { name: "My NFT", description: "This is my NFT", image: "ipfs://...", }, mintRequest: { recipient: "0x...", quantity: "10", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC1155.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; tokenId: bigint; }; signature: `0x${string}`; }>; `` ### Parameters ##### options The options for generating the payload and signature. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; tokenId: bigint; }; signature: `0x${string}`; }>; `` The payload and signature. ## encodeInstall Encodes the install data for the MintableERC1155 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## min Returns the minimum of two BigInt values. ### Example `min(1n, 2n); // 1n ` ##### Signature `function min(a: bigint, b: bigint): bigint; ` ### Parameters ##### a The first BigInt value. #### Type `let a: bigint; ` ##### b The second BigInt value. #### Type `let b: bigint; ` ### Returns ##### Return Type `let returnType: bigint; ` The smaller of the two BigInt values. ## mintWithRole Mints ERC1155 tokens to a specified address via a MintableERC1155 module. ### Example `import { MintableERC1155 } from "thirdweb/modules"; const transaction = MintableERC1155.mintWithRole({ contract, to: "0x...", // Address to mint tokens to amount: 2, // Amount of tokens to mint nft: { name: "My NFT", description: "This is my NFT", image: "ipfs://...", }, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mintWithRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[EditionMintParams](https://portal.thirdweb.com/references/typescript/v5/EditionMintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[EditionMintParams](https://portal.thirdweb.com/references/typescript/v5/EditionMintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## mintWithSignature Mints ERC1155 tokens to a specified address with a signature via a MintableERC1155 module. ### Example `import { MintableERC1155 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC1155.generateMintSignature({ account, contract, nft: { name: "My NFT", description: "This is my NFT", image: "ipfs://...", }, mintRequest: { recipient: "0x...", quantity: "10", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC1155.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; tokenId: bigint; }; signature: `0x${string}`; }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); `` ### Parameters ##### options The options for minting tokens. #### Type `` let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; tokenId: bigint; }; signature: `0x${string}`; }>; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { MintableERC1155 } from "thirdweb/modules"; const transaction = MintableERC1155.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeInstall Encodes the install data for the MintableERC20 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## generateMintSignature Generates a mint signature for a given mint request to be used with a MintableERC20 module. ### Example `import { MintableERC20 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC20.generateMintSignature({ account, contract, mintRequest: { recipient: "0x...", quantity: "10", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC20.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise<{ payload: { amount: bigint; data: `0x${string}`; to: `0x${string}` }; signature: `0x${string}`; }>; `` ### Parameters ##### options The options for minting tokens. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ payload: { amount: bigint; data: `0x${string}`; to: `0x${string}` }; signature: `0x${string}`; }>; `` A transaction to mint tokens. ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { MintableERC20 } from "thirdweb/modules"; const result = await MintableERC20.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## module Convenience function to add the MintableERC1155 module as a default module on a core contract. ### Example `import { MintableERC1155, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [ MintableERC1155.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## install Installs the MintableERC20 module on a core contract. ### Example `import { MintableERC20 } from "thirdweb/modules"; const transaction = MintableERC20.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## mintWithRole Mints ERC20 tokens to a specified address via a MintableERC20 module. ### Example `import { MintableERC20 } from "thirdweb/modules"; const transaction = MintableERC20.mintWithRole({ contract, to: "0x...", // Address to mint tokens to quantity: 2, // Amount of tokens to mint (in decimals) }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mintWithRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenMintParams](https://portal.thirdweb.com/references/typescript/v5/TokenMintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[TokenMintParams](https://portal.thirdweb.com/references/typescript/v5/TokenMintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## encodeInstall Encodes the install data for the MintableERC721 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## module Convenience function to add the MintableERC20 module as a default module on a core contract. ### Example `import { MintableERC20, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC20", params: { name: "My Modular Contract", }, modules: [ MintableERC20.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## generateMintSignature Generates a payload and signature for minting ERC721 tokens via a MintableERC721 module. ### Example `import { MintableERC20 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC721.generateMintSignature({ account, contract, nfts: [ { name: "My NFT", description: "My NFT", image: "https://example.com/image.png", }, ], mintRequest: { recipient: "0x...", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC20.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function generateMintSignature( options: [GenerateMintSignatureOptions](https://portal.thirdweb.com/references/typescript/v5/GenerateMintSignatureOptions), ): Promise<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>; `` ### Parameters ##### options The options for generating the payload and signature. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); contractType?: "TokenERC1155" | "SignatureMintERC1155"; mintRequest: GeneratePayloadInput; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>; `` The payload and signature. ## mintWithSignature Mints ERC20 tokens to a specified address with a signature via a MintableERC20 module. ### Example `import { MintableERC20 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC20.generateMintSignature({ account, contract, mintRequest: { recipient: "0x...", quantity: "10", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC20.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); `` ### Parameters ##### options The options for minting tokens. #### Type `` let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; data: `0x${string}`; to: `0x${string}` }; signature: `0x${string}`; }>; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## getSaleConfig Calls the "getSaleConfig" function on the contract. ### Example `import { MintableERC721 } from "thirdweb/modules"; const result = await MintableERC721.getSaleConfig({ contract, }); ` ##### Signature `function getSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getSaleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { MintableERC20 } from "thirdweb/modules"; const transaction = MintableERC20.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## install Installs the MintableERC721 module on a core contract. ### Example `import { MintableERC721 } from "thirdweb/modules"; const transaction = MintableERC721.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## mintWithRole Mints ERC721 tokens to a specified address via a MintableERC721 module. ### Example `import { MintableERC721 } from "thirdweb/modules"; const transaction = MintableERC721.mintWithRole({ contract, to: "0x...", // Address to mint tokens to nfts: [ { name: "My NFT", description: "This is my NFT", image: "ipfs://...", }, ], }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function mintWithRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NFTMintParams](https://portal.thirdweb.com/references/typescript/v5/NFTMintParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for minting tokens. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NFTMintParams](https://portal.thirdweb.com/references/typescript/v5/NFTMintParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## module Convenience function to add the MintableERC721 module as a default module on a core contract. ### Example `import { MintableERC721, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [ MintableERC721.module({ primarySaleRecipient: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## setSaleConfig Prepares a transaction to call the "setSaleConfig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { MintableERC721 } from "thirdweb/modules"; const transaction = MintableERC721.setSaleConfig({ contract, primarySaleRecipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSaleConfig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSaleConfig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetSaleConfigParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## cancelOwnershipHandover Prepares a transaction to call the "cancelOwnershipHandover" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { cancelOwnershipHandover } from "thirdweb/extensions/modules"; const transaction = cancelOwnershipHandover(); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function cancelOwnershipHandover( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "cancelOwnershipHandover" function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## completeOwnershipHandover Prepares a transaction to call the "completeOwnershipHandover" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { completeOwnershipHandover } from "thirdweb/extensions/modules"; const transaction = completeOwnershipHandover({ contract, pendingOwner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function completeOwnershipHandover( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CompleteOwnershipHandoverParams](https://portal.thirdweb.com/references/typescript/v5/CompleteOwnershipHandoverParams) | { asyncParams: () => Promise<[CompleteOwnershipHandoverParams](https://portal.thirdweb.com/references/typescript/v5/CompleteOwnershipHandoverParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "completeOwnershipHandover" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CompleteOwnershipHandoverParams](https://portal.thirdweb.com/references/typescript/v5/CompleteOwnershipHandoverParams) | { asyncParams: () => Promise<[CompleteOwnershipHandoverParams](https://portal.thirdweb.com/references/typescript/v5/CompleteOwnershipHandoverParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeMintParams Encodes the parameters for the "encodeBytesBeforeMintERC721" function. ### Example `import { encodeEncodeBytesBeforeMintERC721Params } "thirdweb/extensions/modules"; const result = encodeEncodeBytesBeforeMintERC721Params({ params: ..., }); ` ##### Signature `` function encodeMintParams( options: EncodeBytesBeforeMintERC721Params, ): `0x${string}`; `` ### Parameters ##### options The options for the encodeBytesBeforeMintERC721 function. #### Type `let options: EncodeBytesBeforeMintERC721Params; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The encoded ABI parameters. ## encodeMintParams Encodes the parameters for the "encodeBytesBeforeMintERC20" function. ### Example `import { encodeEncodeBytesBeforeMintERC20Params } "thirdweb/extensions/modules"; const result = encodeEncodeBytesBeforeMintERC20Params({ params: ..., }); ` ##### Signature `` function encodeMintParams( options: EncodeBytesBeforeMintERC20Params, ): `0x${string}`; `` ### Parameters ##### options The options for the encodeBytesBeforeMintERC20 function. #### Type `let options: EncodeBytesBeforeMintERC20Params; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The encoded ABI parameters. ## encodeMintParams Encodes the parameters for the "encodeBytesBeforeMintERC1155" function. ### Example `import { encodeEncodeBytesBeforeMintERC1155Params } "thirdweb/extensions/modules"; const result = encodeEncodeBytesBeforeMintERC1155Params({ params: ..., }); ` ##### Signature `` function encodeMintParams( options: EncodeBytesBeforeMintERC1155Params, ): `0x${string}`; `` ### Parameters ##### options The options for the encodeBytesBeforeMintERC1155 function. #### Type `let options: EncodeBytesBeforeMintERC1155Params; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The encoded ABI parameters. ## getInstalledModules Calls the "getInstalledModules" function on the contract. ### Example `import { getInstalledModules } from "thirdweb/extensions/modules"; const result = await getInstalledModules({ contract, }); ` ##### Signature `` function getInstalledModules(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise; fallbackFunctions: readonly Array<{ permissionBits: bigint; selector: `0x${string}` }>; registerInstallationCallback: boolean; requiredInterfaces: readonly Array<`0x${string}`>; supportedInterfaces: readonly Array<`0x${string}`> }; implementation: string }>> `` ### Parameters ##### options The options for the getInstalledModules function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise; fallbackFunctions: readonly Array<{ permissionBits: bigint; selector: `0x${string}` }>; registerInstallationCallback: boolean; requiredInterfaces: readonly Array<`0x${string}`>; supportedInterfaces: readonly Array<`0x${string}`> }; implementation: string }>> `` The parsed result of the function call. ## getSupportedCallbackFunctions Calls the "getSupportedCallbackFunctions" function on the contract. ### Example `import { getSupportedCallbackFunctions } from "thirdweb/extensions/modules"; const result = await getSupportedCallbackFunctions({ contract, }); ` ##### Signature `` function getSupportedCallbackFunctions(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise> `` ### Parameters ##### options The options for the getSupportedCallbackFunctions function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise> `` The parsed result of the function call. ## getModuleConfig Calls the "getModuleConfig" function on the contract. ### Example `import { getModuleConfig } from "thirdweb/extensions/modules"; const result = await getModuleConfig({ contract, }); ` ##### Signature `` function getModuleConfig(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise<{ callbackFunctions: readonly Array<{ selector: `0x${string}` }>; fallbackFunctions: readonly Array<{ permissionBits: bigint; selector: `0x${string}` }>; registerInstallationCallback: boolean; requiredInterfaces: readonly Array<`0x${string}`>; supportedInterfaces: readonly Array<`0x${string}`> }> `` ### Parameters ##### options The options for the getModuleConfig function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<{ callbackFunctions: readonly Array<{ selector: `0x${string}` }>; fallbackFunctions: readonly Array<{ permissionBits: bigint; selector: `0x${string}` }>; registerInstallationCallback: boolean; requiredInterfaces: readonly Array<`0x${string}`>; supportedInterfaces: readonly Array<`0x${string}`> }> `` The parsed result of the function call. ## hasAnyRole Calls the "hasAnyRole" function on the contract. ### Example `import { hasAnyRole } from "thirdweb/extensions/modules"; const result = await hasAnyRole({ contract, user: ..., roles: ..., }); ` ##### Signature `function hasAnyRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasAnyRoleParams](https://portal.thirdweb.com/references/typescript/v5/HasAnyRoleParams)>, ): Promise; ` ### Parameters ##### options The options for the hasAnyRole function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasAnyRoleParams](https://portal.thirdweb.com/references/typescript/v5/HasAnyRoleParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## grantRoles Prepares a transaction to call the "grantRoles" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { grantRoles } from "thirdweb/extensions/modules"; const transaction = grantRoles({ contract, user: ..., roles: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function grantRoles( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [GrantRolesParams](https://portal.thirdweb.com/references/typescript/v5/GrantRolesParams) | { asyncParams: () => Promise<[GrantRolesParams](https://portal.thirdweb.com/references/typescript/v5/GrantRolesParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "grantRoles" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [GrantRolesParams](https://portal.thirdweb.com/references/typescript/v5/GrantRolesParams) | { asyncParams: () => Promise<[GrantRolesParams](https://portal.thirdweb.com/references/typescript/v5/GrantRolesParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## hasAllRoles Calls the "hasAllRoles" function on the contract. ### Example `import { hasAllRoles } from "thirdweb/extensions/modules"; const result = await hasAllRoles({ contract, user: ..., roles: ..., }); ` ##### Signature `function hasAllRoles( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasAllRolesParams](https://portal.thirdweb.com/references/typescript/v5/HasAllRolesParams)>, ): Promise; ` ### Parameters ##### options The options for the hasAllRoles function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasAllRolesParams](https://portal.thirdweb.com/references/typescript/v5/HasAllRolesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## installModule Prepares a transaction to call the "installModule" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { installModule } from "thirdweb/extensions/modules"; const transaction = installModule({ contract, moduleContract: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function installModule( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [InstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/InstallModuleParams) | { asyncParams: () => Promise<[InstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/InstallModuleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "installModule" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [InstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/InstallModuleParams) | { asyncParams: () => Promise<[InstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/InstallModuleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## isGetSupportedCallbackFunctionsSupported Checks if the `getSupportedCallbackFunctions` method is supported by the given contract. ### Example `import { isGetSupportedCallbackFunctionsSupported } from "thirdweb/extensions/modules"; const supported = isGetSupportedCallbackFunctionsSupported(["0x..."]); ` ##### Signature `function isGetSupportedCallbackFunctionsSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getSupportedCallbackFunctions` method is supported. ## isGetModuleConfigSupported Checks if the `getModuleConfig` method is supported by the given contract. ### Example `import { isGetModuleConfigSupported } from "thirdweb/extensions/modules"; const supported = isGetModuleConfigSupported(["0x..."]); ` ##### Signature `function isGetModuleConfigSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getModuleConfig` method is supported. ## isInstallModuleSupported Checks if the `installModule` method is supported by the given contract. ### Example `import { isInstallModuleSupported } from "thirdweb/extensions/modules"; const supported = isInstallModuleSupported(["0x..."]); ` ##### Signature `function isInstallModuleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `installModule` method is supported. ## isUninstallModuleSupported Checks if the `uninstallModule` method is supported by the given contract. ### Example `import { isUninstallModuleSupported } from "thirdweb/extensions/modules"; const supported = isUninstallModuleSupported(["0x..."]); ` ##### Signature `function isUninstallModuleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `uninstallModule` method is supported. ## owner Calls the "owner" function on the contract. ### Example `import { owner } from "thirdweb/extensions/modules"; const result = await owner({ contract, }); ` ##### Signature `function owner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the owner function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## moduleInstalledEvent Creates an event object for the ModuleInstalled event. ### Example `import { getContractEvents } from "thirdweb"; import { moduleInstalledEvent } from "thirdweb/extensions/modules"; const events = await getContractEvents({ contract, events: [moduleInstalledEvent()], }); ` ##### Signature `function moduleInstalledEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "caller"; readonly type: "address" }, { readonly name: "implementation"; readonly type: "address" }, { readonly name: "installedModule"; readonly type: "address" }, ]; readonly name: "ModuleInstalled"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "caller"; readonly type: "address" }, { readonly name: "implementation"; readonly type: "address" }, { readonly name: "installedModule"; readonly type: "address" }, ]; readonly name: "ModuleInstalled"; readonly type: "event"; }>; ` The prepared event object. ## isGetInstalledModulesSupported Checks if the `getInstalledModules` method is supported by the given contract. ### Example `import { isGetInstalledModulesSupported } from "thirdweb/extensions/modules"; const supported = isGetInstalledModulesSupported(["0x..."]); ` ##### Signature `function isGetInstalledModulesSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getInstalledModules` method is supported. ## ownershipHandoverExpiresAt Calls the "ownershipHandoverExpiresAt" function on the contract. ### Example `import { ownershipHandoverExpiresAt } from "thirdweb/extensions/modules"; const result = await ownershipHandoverExpiresAt({ contract, pendingOwner: ..., }); ` ##### Signature `function ownershipHandoverExpiresAt( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[OwnershipHandoverExpiresAtParams](https://portal.thirdweb.com/references/typescript/v5/OwnershipHandoverExpiresAtParams)>, ): Promise; ` ### Parameters ##### options The options for the ownershipHandoverExpiresAt function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[OwnershipHandoverExpiresAtParams](https://portal.thirdweb.com/references/typescript/v5/OwnershipHandoverExpiresAtParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## renounceRoles Prepares a transaction to call the "renounceRoles" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { renounceRoles } from "thirdweb/extensions/modules"; const transaction = renounceRoles({ contract, roles: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function renounceRoles( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RenounceRolesParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRolesParams) | { asyncParams: () => Promise<[RenounceRolesParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRolesParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "renounceRoles" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RenounceRolesParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRolesParams) | { asyncParams: () => Promise<[RenounceRolesParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRolesParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## requestOwnershipHandover Prepares a transaction to call the "requestOwnershipHandover" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { requestOwnershipHandover } from "thirdweb/extensions/modules"; const transaction = requestOwnershipHandover(); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function requestOwnershipHandover( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "requestOwnershipHandover" function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## renounceOwnership Prepares a transaction to call the "renounceOwnership" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { renounceOwnership } from "thirdweb/extensions/modules"; const transaction = renounceOwnership(); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function renounceOwnership( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "renounceOwnership" function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## revokeRoles Prepares a transaction to call the "revokeRoles" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { revokeRoles } from "thirdweb/extensions/modules"; const transaction = revokeRoles({ contract, user: ..., roles: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function revokeRoles( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RevokeRolesParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRolesParams) | { asyncParams: () => Promise<[RevokeRolesParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRolesParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "revokeRoles" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [RevokeRolesParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRolesParams) | { asyncParams: () => Promise<[RevokeRolesParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRolesParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## transferOwnership Prepares a transaction to call the "transferOwnership" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { transferOwnership } from "thirdweb/extensions/modules"; const transaction = transferOwnership({ contract, newOwner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function transferOwnership( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferOwnershipParams](https://portal.thirdweb.com/references/typescript/v5/TransferOwnershipParams) | { asyncParams: () => Promise<[TransferOwnershipParams](https://portal.thirdweb.com/references/typescript/v5/TransferOwnershipParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "transferOwnership" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TransferOwnershipParams](https://portal.thirdweb.com/references/typescript/v5/TransferOwnershipParams) | { asyncParams: () => Promise<[TransferOwnershipParams](https://portal.thirdweb.com/references/typescript/v5/TransferOwnershipParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## rolesOf Calls the "rolesOf" function on the contract. ### Example `import { rolesOf } from "thirdweb/extensions/modules"; const result = await rolesOf({ contract, user: ..., }); ` ##### Signature `function rolesOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RolesOfParams](https://portal.thirdweb.com/references/typescript/v5/RolesOfParams)>, ): Promise; ` ### Parameters ##### options The options for the rolesOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RolesOfParams](https://portal.thirdweb.com/references/typescript/v5/RolesOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## uninstallModule Prepares a transaction to call the "uninstallModule" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { uninstallModule } from "thirdweb/extensions/modules"; const transaction = uninstallModule({ contract, moduleContract: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function uninstallModule( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UninstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/UninstallModuleParams) | { asyncParams: () => Promise<[UninstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/UninstallModuleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "uninstallModule" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UninstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/UninstallModuleParams) | { asyncParams: () => Promise<[UninstallModuleParams](https://portal.thirdweb.com/references/typescript/v5/UninstallModuleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## blockAndAggregate Prepares a transaction to call the "blockAndAggregate" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { blockAndAggregate } from "thirdweb/extensions/multicall3"; const transaction = blockAndAggregate({ contract, calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function blockAndAggregate( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [BlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/BlockAndAggregateParams) | { asyncParams: () => Promise<[BlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/BlockAndAggregateParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "blockAndAggregate" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [BlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/BlockAndAggregateParams) | { asyncParams: () => Promise<[BlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/BlockAndAggregateParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## mintWithSignature Mints ERC721 tokens to a specified address with a signature via a MintableERC721 module. ### Example `import { MintableERC721 } from "thirdweb/modules"; // generate the payload and signature, this is typically done on the server // requires to be generated with a wallet that has the MINTER_ROLE const { payload, signature } = await MintableERC721.generateMintSignature({ account, contract, nfts: [ { name: "My NFT", description: "My NFT", image: "https://example.com/image.png", }, ], mintRequest: { recipient: "0x...", }, }); // prepare the transaction, this is typically done on the client // can be executed by any wallet const transaction = MintableERC721.mintWithSignature({ contract, payload, signature, }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `` function mintWithSignature( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); `` ### Parameters ##### options The options for minting tokens. #### Type `` let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>; `` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction to mint tokens. ## aggregate3Value Prepares a transaction to call the "aggregate3Value" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { aggregate3Value } from "thirdweb/extensions/multicall3"; const transaction = aggregate3Value({ contract, calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function aggregate3Value( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [Aggregate3ValueParams](https://portal.thirdweb.com/references/typescript/v5/Aggregate3ValueParams) | { asyncParams: () => Promise<[Aggregate3ValueParams](https://portal.thirdweb.com/references/typescript/v5/Aggregate3ValueParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "aggregate3Value" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [Aggregate3ValueParams](https://portal.thirdweb.com/references/typescript/v5/Aggregate3ValueParams) | { asyncParams: () => Promise<[Aggregate3ValueParams](https://portal.thirdweb.com/references/typescript/v5/Aggregate3ValueParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## install Installs the MintableERC1155 module on a core contract. ### Example `import { MintableERC1155 } from "thirdweb/modules"; const transaction = MintableERC1155.install({ contract: coreContract, account: account, params: { primarySaleRecipient: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## aggregate3 Prepares a transaction to call the "aggregate3" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { aggregate3 } from "thirdweb/extensions/multicall3"; const transaction = aggregate3({ contract, calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function aggregate3( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [Aggregate3Params](https://portal.thirdweb.com/references/typescript/v5/Aggregate3Params) | { asyncParams: () => Promise<[Aggregate3Params](https://portal.thirdweb.com/references/typescript/v5/Aggregate3Params)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "aggregate3" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [Aggregate3Params](https://portal.thirdweb.com/references/typescript/v5/Aggregate3Params) | { asyncParams: () => Promise<[Aggregate3Params](https://portal.thirdweb.com/references/typescript/v5/Aggregate3Params)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getBasefee Calls the "getBasefee" function on the contract. ### Example `import { getBasefee } from "thirdweb/extensions/multicall3"; const result = await getBasefee({ contract, }); ` ##### Signature `function getBasefee(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the getBasefee function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getBlockHash Calls the "getBlockHash" function on the contract. ### Example `import { getBlockHash } from "thirdweb/extensions/multicall3"; const result = await getBlockHash({ contract, blockNumber: ..., }); ` ##### Signature `` function getBlockHash( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetBlockHashParams](https://portal.thirdweb.com/references/typescript/v5/GetBlockHashParams)>, ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the getBlockHash function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetBlockHashParams](https://portal.thirdweb.com/references/typescript/v5/GetBlockHashParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## getBlockNumber Calls the "getBlockNumber" function on the contract. ### Example `import { getBlockNumber } from "thirdweb/extensions/multicall3"; const result = await getBlockNumber({ contract, }); ` ##### Signature `function getBlockNumber( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getBlockNumber function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getCurrentBlockCoinbase Calls the "getCurrentBlockCoinbase" function on the contract. ### Example `import { getCurrentBlockCoinbase } from "thirdweb/extensions/multicall3"; const result = await getCurrentBlockCoinbase({ contract, }); ` ##### Signature `function getCurrentBlockCoinbase( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getCurrentBlockCoinbase function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getCurrentBlockDifficulty Calls the "getCurrentBlockDifficulty" function on the contract. ### Example `import { getCurrentBlockDifficulty } from "thirdweb/extensions/multicall3"; const result = await getCurrentBlockDifficulty({ contract, }); ` ##### Signature `function getCurrentBlockDifficulty( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getCurrentBlockDifficulty function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getCurrentBlockTimestamp Calls the "getCurrentBlockTimestamp" function on the contract. ### Example `import { getCurrentBlockTimestamp } from "thirdweb/extensions/multicall3"; const result = await getCurrentBlockTimestamp({ contract, }); ` ##### Signature `function getCurrentBlockTimestamp( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getCurrentBlockTimestamp function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getChainId Calls the "getChainId" function on the contract. ### Example `import { getChainId } from "thirdweb/extensions/multicall3"; const result = await getChainId({ contract, }); ` ##### Signature `function getChainId(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the getChainId function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getCurrentBlockGasLimit Calls the "getCurrentBlockGasLimit" function on the contract. ### Example `import { getCurrentBlockGasLimit } from "thirdweb/extensions/multicall3"; const result = await getCurrentBlockGasLimit({ contract, }); ` ##### Signature `function getCurrentBlockGasLimit( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getCurrentBlockGasLimit function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getLastBlockHash Calls the "getLastBlockHash" function on the contract. ### Example `import { getLastBlockHash } from "thirdweb/extensions/multicall3"; const result = await getLastBlockHash({ contract, }); ` ##### Signature `` function getLastBlockHash( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise<`0x${string}`>; `` ### Parameters ##### options The options for the getLastBlockHash function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The parsed result of the function call. ## getEthBalance Calls the "getEthBalance" function on the contract. ### Example `import { getEthBalance } from "thirdweb/extensions/multicall3"; const result = await getEthBalance({ contract, addr: ..., }); ` ##### Signature `function getEthBalance( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetEthBalanceParams](https://portal.thirdweb.com/references/typescript/v5/GetEthBalanceParams)>, ): Promise; ` ### Parameters ##### options The options for the getEthBalance function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetEthBalanceParams](https://portal.thirdweb.com/references/typescript/v5/GetEthBalanceParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## numberToBytes Converts a number to bytes. ### Example `import { numberToBytes } from "thirdweb/utils"; const bytes = numberToBytes(420); console.log(bytes); // Uint8Array(2) [ 1, 164 ] ` ##### Signature `function numberToBytes( value: number | bigint, opts?: Options, ): Uint8Array; ` ### Parameters ##### value The number to convert. #### Type `let value: number | bigint; ` ##### opts optional Options for converting the number to hex. #### Type `let opts: Options; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The bytes representation of the number. ## numberToHex Converts a number or bigint to a hexadecimal string. ### Example `import { numberToHex } from "thirdweb/utils"; const hex = numberToHex(420); console.log(hex); // "0x1a4" ` ##### Signature `` function numberToHex( value_: number | bigint, opts: Options, ): `0x${string}`; `` ### Parameters ##### value\_ The number or bigint value to convert. #### Type `let value_: number | bigint; ` ##### opts Optional configuration options. #### Type `let opts: Options; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hexadecimal representation of the input value. ## tryBlockAndAggregate Prepares a transaction to call the "tryBlockAndAggregate" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { tryBlockAndAggregate } from "thirdweb/extensions/multicall3"; const transaction = tryBlockAndAggregate({ contract, requireSuccess: ..., calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function tryBlockAndAggregate( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TryBlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryBlockAndAggregateParams) | { asyncParams: () => Promise<[TryBlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryBlockAndAggregateParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "tryBlockAndAggregate" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TryBlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryBlockAndAggregateParams) | { asyncParams: () => Promise<[TryBlockAndAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryBlockAndAggregateParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## tryAggregate Prepares a transaction to call the "tryAggregate" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { tryAggregate } from "thirdweb/extensions/multicall3"; const transaction = tryAggregate({ contract, requireSuccess: ..., calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function tryAggregate( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TryAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryAggregateParams) | { asyncParams: () => Promise<[TryAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryAggregateParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "tryAggregate" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [TryAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryAggregateParams) | { asyncParams: () => Promise<[TryAggregateParams](https://portal.thirdweb.com/references/typescript/v5/TryAggregateParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## batchMetadataUpdateEvent Creates an event object for the BatchMetadataUpdate event. ### Example `import { getContractEvents } from "thirdweb"; import { OpenEditionMetadataERC721 } from "thirdweb/modules"; const events = await getContractEvents({ contract, events: [OpenEditionMetadataERC721.batchMetadataUpdateEvent()], }); ` ##### Signature `function batchMetadataUpdateEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_fromTokenId"; readonly type: "uint256" }, { readonly name: "_toTokenId"; readonly type: "uint256" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "_fromTokenId"; readonly type: "uint256" }, { readonly name: "_toTokenId"; readonly type: "uint256" }, ]; readonly name: "BatchMetadataUpdate"; readonly type: "event"; }>; ` The prepared event object. ## install Installs the OpenEditionMetadataERC721 module on a core contract. ### Example `import { OpenEditionMetadataERC721 } from "thirdweb/modules"; const transaction = OpenEditionMetadataERC721.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## setSharedMetadata Prepares a transaction to call the "setSharedMetadata" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { OpenEditionMetadataERC721 } from "thirdweb/modules"; const transaction = OpenEditionMetadataERC721.setSharedMetadata({ contract, metadata: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setSharedMetadata( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams) | { asyncParams: () => Promise<[SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setSharedMetadata" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams) | { asyncParams: () => Promise<[SetSharedMetadataParams](https://portal.thirdweb.com/references/typescript/v5/SetSharedMetadataParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## sharedMetadataUpdatedEvent Creates an event object for the SharedMetadataUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { OpenEditionMetadataERC721 } from "thirdweb/modules"; const events = await getContractEvents({ contract, events: [OpenEditionMetadataERC721.sharedMetadataUpdatedEvent()], }); ` ##### Signature `function sharedMetadataUpdatedEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "name"; readonly type: "string" }, { readonly name: "description"; readonly type: "string" }, { readonly name: "imageURI"; readonly type: "string" }, { readonly name: "animationURI"; readonly type: "string" }, ]; readonly name: "SharedMetadataUpdated"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "name"; readonly type: "string" }, { readonly name: "description"; readonly type: "string" }, { readonly name: "imageURI"; readonly type: "string" }, { readonly name: "animationURI"; readonly type: "string" }, ]; readonly name: "SharedMetadataUpdated"; readonly type: "event"; }>; ` The prepared event object. ## module Convenience function to add the OpenEditionMetadataERC721 module as a default module on a core contract. ### Example `import { OpenEditionMetadataERC721, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [OpenEditionMetadataERC721.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## createNewPack ### Example `import { createNewPack } from "thirdweb/extensions/pack"; const transaction = createNewPack({ contract: packContract, client, recipient: "0x...", tokenOwner: "0x...", packMetadata: { name: "Pack #1", image: "image-of-pack-1", }, openStartTimestamp: new Date(), erc20Rewards: [ { contractAddress: "0x...", quantityPerReward: 1, totalRewards: 1, }, ], erc721Rewards: [ { contractAddress: "0x...", tokenId: 0n, }, ], erc1155Rewards: [ { contractAddress: "0x...", tokenId: 0n, quantityPerReward: 1, totalRewards: 1, }, ], }); ` ##### Signature `function createNewPack( options: WithOverrides<[BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateNewPackParams](https://portal.thirdweb.com/references/typescript/v5/CreateNewPackParams)>>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: WithOverrides< [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CreateNewPackParams](https://portal.thirdweb.com/references/typescript/v5/CreateNewPackParams)> >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ## createPack Prepares a transaction to call the "createPack" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { createPack } from "thirdweb/extensions/pack"; const transaction = createPack({ contract, contents: ..., numOfRewardUnits: ..., packUri: ..., openStartTimestamp: ..., amountDistributedPerOpen: ..., recipient: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function createPack( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams) | { asyncParams: () => Promise<[CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "createPack" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams) | { asyncParams: () => Promise<[CreatePackParams](https://portal.thirdweb.com/references/typescript/v5/CreatePackParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getPackContents Calls the "getPackContents" function on the contract. ### Example `import { getPackContents } from "thirdweb/extensions/pack"; const result = await getPackContents({ contract, packId: ..., }); ` ##### Signature `function getPackContents(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPackContentsParams](https://portal.thirdweb.com/references/typescript/v5/GetPackContentsParams)>) : Promise, readonly Array]> ` ### Parameters ##### options The options for the getPackContents function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPackContentsParams](https://portal.thirdweb.com/references/typescript/v5/GetPackContentsParams)>; ` ### Returns ##### Return Type `let returnType: Promise, readonly Array]> ` The parsed result of the function call. ## openPack Prepares a transaction to call the "openPack" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { openPack } from "thirdweb/extensions/pack"; const transaction = openPack({ contract, packId: ..., amountToOpen: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function openPack( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams) | { asyncParams: () => Promise<[OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "openPack" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams) | { asyncParams: () => Promise<[OpenPackParams](https://portal.thirdweb.com/references/typescript/v5/OpenPackParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getTokenCountOfBundle Calls the "getTokenCountOfBundle" function on the contract. ### Example `import { getTokenCountOfBundle } from "thirdweb/extensions/pack"; const result = await getTokenCountOfBundle({ contract, bundleId: ..., }); ` ##### Signature `function getTokenCountOfBundle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetTokenCountOfBundleParams](https://portal.thirdweb.com/references/typescript/v5/GetTokenCountOfBundleParams)>, ): Promise; ` ### Parameters ##### options The options for the getTokenCountOfBundle function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetTokenCountOfBundleParams](https://portal.thirdweb.com/references/typescript/v5/GetTokenCountOfBundleParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## packCreatedEvent Creates an event object for the PackCreated event. ### Example `import { getContractEvents } from "thirdweb"; import { packCreatedEvent } from "thirdweb/extensions/pack"; const events = await getContractEvents({ contract, events: [ packCreatedEvent({ packId: ..., }) ], }); ` ##### Signature `function packCreatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackCreated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackCreated"; readonly type: "event"; }>; ` The prepared event object. ## packOpenedEvent Creates an event object for the PackOpened event. ### Example `import { getContractEvents } from "thirdweb"; import { packOpenedEvent } from "thirdweb/extensions/pack"; const events = await getContractEvents({ contract, events: [ packOpenedEvent({ packId: ..., opener: ..., }) ], }); ` ##### Signature `function packOpenedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "opener"; readonly type: "address"; }, { readonly name: "numOfPacksOpened"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "totalAmount"; readonly type: "uint256" }, ]; readonly name: "rewardUnitsDistributed"; readonly type: "tuple[]"; }, ]; readonly name: "PackOpened"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly indexed: true; readonly name: "opener"; readonly type: "address"; }, { readonly name: "numOfPacksOpened"; readonly type: "uint256" }, { readonly components: readonly [ { readonly name: "assetContract"; readonly type: "address" }, { readonly name: "tokenType"; readonly type: "uint8" }, { readonly name: "tokenId"; readonly type: "uint256" }, { readonly name: "totalAmount"; readonly type: "uint256" }, ]; readonly name: "rewardUnitsDistributed"; readonly type: "tuple[]"; }, ]; readonly name: "PackOpened"; readonly type: "event"; }>; ` The prepared event object. ## packUpdatedEvent Creates an event object for the PackUpdated event. ### Example `import { getContractEvents } from "thirdweb"; import { packUpdatedEvent } from "thirdweb/extensions/pack"; const events = await getContractEvents({ contract, events: [ packUpdatedEvent({ packId: ..., }) ], }); ` ##### Signature `function packUpdatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackUpdated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "packId"; readonly type: "uint256"; }, { readonly name: "recipient"; readonly type: "address" }, { readonly name: "totalPacksCreated"; readonly type: "uint256" }, ]; readonly name: "PackUpdated"; readonly type: "event"; }>; ` The prepared event object. ## encodeInstall Encodes the install data for the OpenEditionMetadataERC721 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## parseErc6492Signature ### Example `import { parseErc6492Signature } from "thirdweb/auth"; const parsedSignature = parseErc6492Signature( "0x1234567890123456789012345678901234567890", ); ` ##### Signature `` function parseErc6492Signature( signature: `0x${string}`, ): [ParseErc6492SignatureReturnType](https://portal.thirdweb.com/references/typescript/v5/ParseErc6492SignatureReturnType); `` ### Parameters ##### signature The signature to parse #### Type `` let signature: `0x${string}`; `` ### Returns ##### Return Type `let returnType: OneOf<[Erc6492Signature](https://portal.thirdweb.com/references/typescript/v5/Erc6492Signature) | { signature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }>; ` ParseErc6492SignatureReturnType The parsed (or original) signature ## parseEventLogs Parses logs and returns the corresponding events. ### Example `import { parseEventLogs } from "thirdweb"; const events = parseEventLogs({ logs, events: [preparedEvent, preparedEvent2], }); ` ##### Signature `function parseEventLogs( options: [ParseEventLogsOptions](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsOptions), ): [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult); ` ### Parameters ##### options The options for parsing logs. #### Type `let options: [ParseEventLogsOptions](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsOptions); ` ### Returns ##### Return Type `let returnType: [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult); ` The parsed events. ## getAllRoleMembers Retrieves all members of a specific role. ### Example `import { getAllRoleMembers } from "thirdweb/extensions/permissions"; const result = await getAllRoleMembers({ contract, role: "admin", }); ` ##### Signature `function getAllRoleMembers( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllRoleMembersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllRoleMembersParams)>, ): Promise>; ` ### Parameters ##### options The options for retrieving role members. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllRoleMembersParams](https://portal.thirdweb.com/references/typescript/v5/GetAllRoleMembersParams)>; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to an array of strings representing the role members. ## getRoleHash Get a hex value of a smart contract role You need the hex value to interact with the smart contracts. ### Example `const adminRoleHash = getRoleHash("admin"); // 0x0000000...000000 ` ##### Signature `` function getRoleHash(role: RoleInput): `0x${string}`; `` ### Parameters ##### role string #### Type `let role: RoleInput; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` hex value of the contract role ## getRoleAdmin Gets the admin of a role. ### Example `import { getRoleAdmin } from "thirdweb/extensions/permissions"; const result = await getRoleAdmin({ contract, role: "admin", }); ` ##### Signature `function getRoleAdmin( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleAdminParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleAdminParams)>, ): Promise; ` ### Parameters ##### options The options for getting the role's admin. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleAdminParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleAdminParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The address of the role's admin. ## getRoleMemberCount Retrieves the number of members of a specific role. ### Example `import { getRoleMemberCount } from "thirdweb/extensions/permissions"; const result = await getRoleMemberCount({ contract, role: "admin", }); ` ##### Signature `function getRoleMemberCount( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleMemberCountParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleMemberCountParams)>, ): Promise; ` ### Parameters ##### options The options for retrieving role member count. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleMemberCountParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleMemberCountParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the number of members of the role. ## parseAbiParams Converts an array of parameter values to their respective types based on the provided type array. This utility function is particularly useful for ensuring that parameter values are correctly formatted according to the expected types before they are used in further processing or passed to a Solidity smart contract. ### Example `import { parseAbiParams } from "thirdweb/utils"; const example1 = parseAbiParams( ["address", "uint256"], ["0x.....", "1200000"], ); // result: ["0x......", 1200000n] const example2 = parseAbiParams( ["address", "bool"], ["0x.....", "true"], ); // result: ["0x......", true] ` ##### Signature `function parseAbiParams( constructorParamTypes: Array, constructorParamValues: Array, ): Array; ` ### Parameters ##### constructorParamTypes An array of type strings indicating the expected types of the values, following Solidity type conventions (e.g., "address", "uint256", "bool"). #### Type `let constructorParamTypes: Array; ` ##### constructorParamValues An array of values to be converted according to the types. #### Type `let constructorParamValues: Array; ` ### Returns ##### Return Type `let returnType: Array; ` * An array of values converted to their respective types. ## padHex Pads a hexadecimal string with zeros to a specified size. ### Example `import { padHex } from "thirdweb/utils"; const paddedHex = padHex("0x1a4", { size: 32 }); console.log(paddedHex); // "0x000000000000000000000000000001a4" ` ##### Signature `` function padHex( hex_: `0x${string}`, options: PadOptions, ): `0x${string}`; `` ### Parameters ##### hex\_ The hexadecimal string to pad. #### Type `` let hex_: `0x${string}`; `` ##### options The padding options. #### Type `let options: PadOptions; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The padded hexadecimal string. ## getRoleMember Retrieves a specific member of a specific role. ### Example `import { getRoleMember } from "thirdweb/extensions/permissions"; const address = await getRoleMember({ contract, role: "admin", index: 0n, }); ` ##### Signature `function getRoleMember( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleMemberParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleMemberParams)>, ): Promise; ` ### Parameters ##### options The options for retrieving the role member. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoleMemberParams](https://portal.thirdweb.com/references/typescript/v5/GetRoleMemberParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the address of the role member. ## hasRole Checks if the target account has the role. ### Example `import { hasRole } from "thirdweb/extensions/permissions"; const result = await hasRole({ contract, role: "admin", targetAccountAddress: "0x1234567890123456789012345678901234567890", }); ` ##### Signature `function hasRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasRoleParams](https://portal.thirdweb.com/references/typescript/v5/HasRoleParams)>, ): Promise; ` ### Parameters ##### options The options for checking the role. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasRoleParams](https://portal.thirdweb.com/references/typescript/v5/HasRoleParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` A boolean that is true if the target account has the role. ## grantRole Grants a role to a target account. ### Example `import { grantRole } from "thirdweb/extensions/permissions"; import { sendTransaction } from "thirdweb"; const transaction = grantRole({ contract, role: "admin", targetAccountAddress: "0x1234567890123456789012345678901234567890", }); await sendTransaction({ transaction, account }); ` ##### Signature `function grantRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GrantRoleParams](https://portal.thirdweb.com/references/typescript/v5/GrantRoleParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for granting the role. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GrantRoleParams](https://portal.thirdweb.com/references/typescript/v5/GrantRoleParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that grants the role when sent. ## isGetRoleMemberCountSupported Checks if the `getRoleMemberCount` method is supported by the given contract. ### Example `import { isGetRoleMemberCountSupported } from "thirdweb/extensions/permissions"; const supported = isGetRoleMemberCountSupported(["0x..."]); ` ##### Signature `function isGetRoleMemberCountSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getRoleMemberCount` method is supported. ## isGetRoleAdminSupported Checks if the `getRoleAdmin` method is supported by the given contract. ### Example `import { isGetRoleAdminSupported } from "thirdweb/extensions/permissions"; const supported = isGetRoleAdminSupported(["0x..."]); ` ##### Signature `function isGetRoleAdminSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getRoleAdmin` method is supported. ## isGrantRoleSupported Checks if the `grantRole` method is supported by the given contract. ### Example `import { isGrantRoleSupported } from "thirdweb/extensions/permissions"; const supported = isGrantRoleSupported(["0x..."]); ` ##### Signature `function isGrantRoleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `grantRole` method is supported. ## isGetRoleMemberSupported Checks if the `getRoleMember` method is supported by the given contract. ### Example `import { isGetRoleMemberSupported } from "thirdweb/extensions/permissions"; const supported = isGetRoleMemberSupported(["0x..."]); ` ##### Signature `function isGetRoleMemberSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getRoleMember` method is supported. ## isHasRoleSupported Checks if the `hasRole` method is supported by the given contract. ### Example `import { isHasRoleSupported } from "thirdweb/extensions/permissions"; const supported = isHasRoleSupported(["0x..."]); ` ##### Signature `function isHasRoleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `hasRole` method is supported. ## isRenounceRoleSupported Checks if the `renounceRole` method is supported by the given contract. ### Example `import { isRenounceRoleSupported } from "thirdweb/extensions/permissions"; const supported = isRenounceRoleSupported(["0x..."]); ` ##### Signature `function isRenounceRoleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `renounceRole` method is supported. ## renounceRole Lets the target account renounce the role. (The target account must be the sender of the transaction.) ### Example `import { renounceRole } from "thirdweb/extensions/permissions"; import { sendTransaction } from "thirdweb"; const transaction = renounceRole({ contract, role: "admin", targetAccountAddress: "0x1234567890123456789012345678901234567890", }); await sendTransaction({ transaction, account }); ` ##### Signature `function renounceRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RenounceRoleParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRoleParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for renouncing the role. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RenounceRoleParams](https://portal.thirdweb.com/references/typescript/v5/RenounceRoleParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that revokes the role when sent. ## isRevokeRoleSupported Checks if the `revokeRole` method is supported by the given contract. ### Example `import { isRevokeRoleSupported } from "thirdweb/extensions/permissions"; const supported = isRevokeRoleSupported(["0x..."]); ` ##### Signature `function isRevokeRoleSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `revokeRole` method is supported. ## roleAdminChangedEvent Creates an event object for the RoleAdminChanged event. ### Example `import { getContractEvents } from "thirdweb"; import { roleAdminChangedEvent } from "thirdweb/extensions/permissions"; const events = await getContractEvents({ contract, events: [ roleAdminChangedEvent({ role: ..., previousAdminRole: ..., newAdminRole: ..., }) ], }); ` ##### Signature `function roleAdminChangedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "previousAdminRole"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "newAdminRole"; readonly type: "bytes32"; }, ]; readonly name: "RoleAdminChanged"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "previousAdminRole"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "newAdminRole"; readonly type: "bytes32"; }, ]; readonly name: "RoleAdminChanged"; readonly type: "event"; }>; ` The prepared event object. ## revokeRole Revokes a role from a target account. ### Example `import { revokeRole } from "thirdweb/extensions/permissions"; import { sendTransaction } from "thirdweb"; const transaction = revokeRole({ contract, role: "admin", targetAccountAddress: "0x1234567890123456789012345678901234567890", }); await sendTransaction({ transaction, account }); ` ##### Signature `function revokeRole( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RevokeRoleParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRoleParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for revoking the role. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RevokeRoleParams](https://portal.thirdweb.com/references/typescript/v5/RevokeRoleParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A transaction that revokes the role when sent. ## roleGrantedEvent Creates an event object for the RoleGranted event. ### Example `import { getContractEvents } from "thirdweb"; import { roleGrantedEvent } from "thirdweb/extensions/permissions"; const events = await getContractEvents({ contract, events: [ roleGrantedEvent({ role: ..., account: ..., sender: ..., }) ], }); ` ##### Signature `function roleGrantedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "account"; readonly type: "address"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "RoleGranted"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "account"; readonly type: "address"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "RoleGranted"; readonly type: "event"; }>; ` The prepared event object. ## roleRevokedEvent Creates an event object for the RoleRevoked event. ### Example `import { getContractEvents } from "thirdweb"; import { roleRevokedEvent } from "thirdweb/extensions/permissions"; const events = await getContractEvents({ contract, events: [ roleRevokedEvent({ role: ..., account: ..., sender: ..., }) ], }); ` ##### Signature `function roleRevokedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "account"; readonly type: "address"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "RoleRevoked"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "role"; readonly type: "bytes32"; }, { readonly indexed: true; readonly name: "account"; readonly type: "address"; }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "RoleRevoked"; readonly type: "event"; }>; ` The prepared event object. ## isGetAllRoleMembersSupported Checks if the `getAllRoleMembers` method is supported by the given contract. ### Example `import { isGetAllRoleMembersSupported } from "thirdweb/extensions/permissions"; const supported = isGetAllRoleMembersSupported(["0x..."]); ` ##### Signature `function isGetAllRoleMembersSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `getAllRoleMembers` method is supported. ## predictAddress Deprecated Use `predictSmartAccountAddress` instead. Predict the address of a smart account. ### Example `import { predictAddress } from "thirdweb/wallets/smart"; const predictedAddress = await predictAddress({ factoryContract, adminAddress, accountSalt, }); ` ##### Signature `function predictAddress(args: { accountAddress?: string; accountSalt?: string; adminAddress: string; factoryContract: Readonly; predictAddressOverride?: ( factoryContract: Readonly, admin: string, ) => Promise; }): Promise; ` ### Parameters ##### args The options for predicting the address of a smart account. #### Type `let args: { accountAddress?: string; accountSalt?: string; adminAddress: string; factoryContract: Readonly; predictAddressOverride?: ( factoryContract: Readonly, admin: string, ) => Promise; }; ` ### Returns ##### Return Type `let returnType: Promise; ` The predicted address of the smart account. ## preAuthenticate Pre-authenticates the user based on the provided authentication strategy. Use this function to send a verification code to the user's email or phone number. ### Example `import { preAuthenticate } from "thirdweb/wallets/in-app"; const result = await preAuthenticate({ client, strategy: "email", email: "example@example.org", }); ` ##### Signature `function preAuthenticate(args: PreAuthArgsType): Promise; ` ### Parameters ##### args The arguments required for pre-authentication. #### Type `let args: PreAuthArgsType; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the pre-authentication result. ## predictSmartAccountAddress Predict the address of a smart account. ### Example `import { predictSmartAccountAddress } from "thirdweb/wallets/smart"; const predictedAddress = await predictSmartAccountAddress({ client, chain, adminAddress, }); ` ##### Signature `function predictSmartAccountAddress(args: { accountSalt?: string; adminAddress: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); factoryAddress?: string; }): Promise; ` ### Parameters ##### args The options for predicting the address of a smart account. #### Type `let args: { accountSalt?: string; adminAddress: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); factoryAddress?: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` The predicted address of the smart account. ## prepareEvent Prepares an event by parsing the signature, generating the event hash, and encoding the event topics. ### Example `import { prepareEvent } from "thirdweb"; const myEvent = prepareEvent({ signature: "event MyEvent(uint256 myArg)", }); ` ##### Signature `function prepareEvent( options: [PrepareEventOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareEventOptions), ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>; ` ### Parameters ##### options The options for preparing the event. #### Type `let options: [PrepareEventOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareEventOptions); ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)>; ` The prepared event object. ## prepareMethod Prepares a method for usage by converting it into a prepared method object. ### Example `import { prepareMethod } from "thirdweb/utils"; const method = "function transfer(address to, uint256 value)"; const preparedMethod = prepareMethod(method); ` ##### Signature `function prepareMethod(method: TMethod): PreparedMethod; ` ### Parameters ##### method The method to prepare. #### Type `let method: TMethod; ` ### Returns ##### Return Type `let returnType: PreparedMethod; ` The prepared method object. ## privateKeyToAccount Get an `Account` object from a private key. ### Example `import { privateKeyToAccount } from "thirdweb/wallets"; const wallet = privateKeyToAccount({ client, privateKey: "...", }); ` ##### Signature `function privateKeyToAccount( options: [PrivateKeyToAccountOptions](https://portal.thirdweb.com/references/typescript/v5/PrivateKeyToAccountOptions), ): [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ### Parameters ##### options The options for `privateKeyToAccount`Refer to the type [PrivateKeyToAccountOptions](https://portal.thirdweb.com/references/typescript/v5/PrivateKeyToAccountOptions) #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); privateKey: string }; ` ### Returns ##### Return Type `let returnType: { address: Address; estimateGas?: (tx: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)) => Promise; onTransactionRequested?: ( transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction), ) => Promise; sendBatchTransaction?: ( txs: Array, ) => Promise; sendRawTransaction?: ( tx: SendRawTransactionOptions, ) => Promise; sendTransaction: ( tx: SendTransactionOption, ) => Promise; signAuthorization?: ( authorization: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest), ) => Promise<[SignedAuthorization](https://portal.thirdweb.com/references/typescript/v5/SignedAuthorization)>; signMessage: ({ message, originalMessage, chainId, }: { chainId?: number; message: SignableMessage; originalMessage?: string; }) => Promise; signTransaction?: (tx: SerializableTransaction) => Promise; signTypedData: ( _typedData: ox__TypedData.Definition, ) => Promise; watchAsset?: (asset: WatchAssetParams) => Promise; }; ` The `Account` object that represents the private key ## aggregate Prepares a transaction to call the "aggregate" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { aggregate } from "thirdweb/extensions/multicall3"; const transaction = aggregate({ contract, calls: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function aggregate( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AggregateParams](https://portal.thirdweb.com/references/typescript/v5/AggregateParams) | { asyncParams: () => Promise<[AggregateParams](https://portal.thirdweb.com/references/typescript/v5/AggregateParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "aggregate" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AggregateParams](https://portal.thirdweb.com/references/typescript/v5/AggregateParams) | { asyncParams: () => Promise<[AggregateParams](https://portal.thirdweb.com/references/typescript/v5/AggregateParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## randomPrivateKey Generates a random ECDSA private key on the secp256k1 curve. ### Example `import { Secp256k1 } from "ox"; const privateKey = Secp256k1.randomPrivateKey(); ` ##### Signature `function randomPrivateKey(options?: Options): ReturnType; ` ### Parameters ##### options optional The options to generate the private key. #### Type `let options: Options; ` ### Returns ##### Return Type `let returnType: ReturnType; ` The generated private key. ## readContract #### Reads state from a deployed smart contract. Use this for raw read calls from a contract, but you can also use read [ extensions](https://portal.thirdweb.com/typescript/v5/extensions/use) for predefined methods for common standards. ### Example #### Raw contract call (recommended) You can read from any contract by using the solidity signature of the function you want to call. `import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useReadContract } from "thirdweb/react"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); const { data, isLoading } = useReadContract({ contract, method: "function tokenURI(uint256 tokenId) returns (string)", params: [1n], }); ` Note that this is type safe, the params types will be enforced based on the signature. #### Raw contract call with `resolveMethod` If you don't have the solidity signature of the function you want to call, you can use the `resolveMethod` helper to resolve the method from any deployed contract. Note that this is not type safe, and will also have a 1 time overhead of resolving the contract ABI. `import { getContract, resolveMethod } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useReadContract } from "thirdweb/react"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); const { data, isLoading } = useReadContract({ contract, method: resolveMethod("tokenURI"), params: [1n], }); ` ##### Signature `function readContract( options: [ReadContractOptions](https://portal.thirdweb.com/references/typescript/v5/ReadContractOptions), ): Promise<[ReadContractResult](https://portal.thirdweb.com/references/typescript/v5/ReadContractResult)>; ` ### Parameters ##### options The transaction options. #### Type `let options: [ReadContractOptions](https://portal.thirdweb.com/references/typescript/v5/ReadContractOptions); ` ### Returns ##### Return Type `let returnType: outputs extends { length: 0 } ? never : outputs extends { length: 1 } ? AbiParametersToPrimitiveTypes[0] : AbiParametersToPrimitiveTypes; ` A promise that resolves with the result of the read call. ## prepareContractCall Prepares a contract call by resolving the ABI function, parameters and encoded data. Optionally specify other properties such as value or gas price. ### Example #### Usage with a human-readable method signature: `import { prepareContractCall } from "thirdweb"; const transaction = prepareContractCall({ contract, method: "function transfer(address to, uint256 value)", params: [to, value], }); ` #### Usage with explicit gas price and/or value: `import { prepareContractCall } from "thirdweb"; import { toWei } from "thirdweb/utils"; const transaction = prepareContractCall({ contract, method: "function transfer(address to, uint256 value)", params: [to, value], maxFeePerGas: 30n, maxPriorityFeePerGas: 1n, value: toWei("0.01"), }); ` #### Usage with ERC20 value: For transactions that transfer ERC20 tokens, you can specify the value as the amount of tokens to transfer. You can use this in conjuction with the [getApprovalForTransaction](https://portal.thirdweb.com/references/typescript/v5/getApprovalForTransaction) function to easily create approval transactions for ERC20 tokens. This value will also be read by the react hooks and UI components to present to total cost to the user. `import { prepareContractCall } from "thirdweb"; import { toWei } from "thirdweb/utils"; const transaction = prepareContractCall({ contract, method: "function payWithCoin()", params: [], erc20Value: { tokenAddress: "0x...", // the address of the ERC20 token amountWei: toWei("0.1"), // the amount of tokens to transfer in wei }, }); ` #### Usage with a JSON ABI function object: `import { prepareContractCall } from "thirdweb"; const transaction = prepareContractCall({ contract, method: { name: "transfer", type: "function", inputs: [ { name: "to", type: "address" }, { name: "value", type: "uint256" }, ], outputs: [], stateMutability: "payable", }, params: [to, value], }); ` #### Usage with the ABI defined on the contract: `import { getContract, prepareContractCall } from "thirdweb"; const contract = getContract({ ..., // chain, address, client abi: [...] // ABI with a "transfer" method }); const transaction = prepareContractCall({ contract, method: "transfer", // <- this gets inferred from the contract params: [to, value], }); ` #### Passing extra call data to the transaction `import { getContract, prepareContractCall } from "thirdweb"; const contract = getContract({ ..., // chain, address, client }); const transaction = prepareContractCall({ contract, method: "function transfer(address to, uint256 value)", params: [...], // The extra call data MUST be encoded to hex before passing extraCallData: "0x......." }); ` ##### Signature `function prepareContractCall( options: [PrepareContractCallOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareContractCallOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< TAbi, ParseMethod, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ### Parameters ##### options The options for preparing the contract call. #### Type `let options: [PrepareContractCallOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareContractCallOptions)< TAbi, TMethod, TPreparedMethod >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< TAbi, ParseMethod, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A promise that resolves to the prepared transaction. ## refreshJWT Refreshes a JSON Web Token (JWT) by encoding a new payload with updated expiration time. ### Example `import { refreshJWT } from "thirdweb/utils"; const jwt = await refreshJWT({ account, jwt, expirationTime: 1000 * 60 * 60, }); ` ##### Signature `function refreshJWT(options: [RefreshJWTParams](https://portal.thirdweb.com/references/typescript/v5/RefreshJWTParams)): Promise; ` ### Parameters ##### options The options for refreshing the JWT. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); expirationTime?: number; jwt: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A Promise that resolves to the refreshed JWT. ## resolveAbiFromBytecode Resolves the ABI (Application Binary Interface) from the bytecode of a contract. ### Example `import { createThirdwebClient, getContract } from "thirdweb"; import { resolveAbiFromBytecode } from "thirdweb/contract"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const myContract = getContract({ client, address: "...", chain: ethereum, }); const abi = await resolveAbiFromBytecode(myContract); ` ##### Signature `` function resolveAbiFromBytecode( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, ): Promise; `` ### Parameters ##### contract The ThirdwebContract instance. #### Type `` let contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ### Returns ##### Return Type `let returnType: readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)> ` The resolved ABI as a generic type. ## resolveArweaveScheme Resolves the scheme of a given Arweave URI and returns the corresponding URL. ### Example `import { resolveArweaveScheme } from "thirdweb/storage"; const url = resolveArweaveScheme({ uri: "ar://" }); ` ##### Signature `function resolveArweaveScheme( options: [ResolveArweaveSchemeOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveArweaveSchemeOptions), ): string; ` ### Parameters ##### options The options object containing the Arweave URI #### Type `let options: { gatewayUrl?: string; uri: string }; ` ### Returns ##### Return Type `let returnType: string; ` The resolved URL ## resolveCompositeAbi Resolves the ABI for a contract based on its bytecode. If the contract follows the plugin-pattern or dynamic pattern, it resolves the ABIs for the plugins and merges them with the root ABI. If the contract follows the base router pattern, it resolves the ABIs for the plugins and merges them with the root ABI. If the contract follows the diamond pattern, it resolves the ABIs for the facets and merges them with the root ABI. ### Example `import { createThirdwebClient, getContract } from "thirdweb"; import { resolveCompositeAbiFromBytecode } from "thirdweb/contract"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const myContract = getContract({ client, address: "...", chain: ethereum, }); const abi = await resolveCompositeAbiFromBytecode(myContract); ` ##### Signature `function resolveCompositeAbi( contract: Readonly, rootAbi?: Abi, resolveSubAbi?: (contract: Readonly) => Promise, ): Promise; ` ### Parameters ##### contract The contract for which to resolve the ABI. #### Type `let contract: Readonly; ` ##### rootAbi optional The root ABI to use for the contract. If not provided, it resolves the ABI from the contract's bytecode. #### Type `let rootAbi: readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)> ` ##### resolveSubAbi optional A function to resolve the ABI for a sub-contract. If not provided, it uses the default ABI resolution logic. #### Type `let resolveSubAbi: (contract: Readonly) => Promise; ` ### Returns ##### Return Type `let returnType: readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)> ` The resolved ABI for the contract. ## resolveContractAbi Resolves the ABI (Application Binary Interface) for a given contract. If the ABI is already cached, it returns the cached value. Otherwise, it tries to resolve the ABI from the contract's API. If that fails, it resolves the ABI from the contract's bytecode. ### Example `import { createThirdwebClient, getContract } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const myContract = getContract({ client, address: "...", chain: ethereum, }); const abi = await resolveContractAbi(myContract); ` ##### Signature `` function resolveContractAbi( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, contractApiBaseUrl: string, ): Promise; `` ### Parameters ##### contract The contract for which to resolve the ABI. #### Type `` let contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ##### contractApiBaseUrl The base URL of the contract API. Defaults to "https://contract.thirdweb.com/abi". #### Type `let contractApiBaseUrl: string; ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the ABI of the contract. ## resolveImplementation Resolves the implementation address and bytecode for a given proxy contract. ### Example `import { resolveImplementation } from "thirdweb"; const implementation = await resolveImplementation(contract); ` ##### Signature `` function resolveImplementation( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, ): Promise<{ address: string; bytecode: `0x${string}` }>; `` ### Parameters ##### contract The contract to resolve the implementation for. #### Type `` let contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ### Returns ##### Return Type `` let returnType: Promise<{ address: string; bytecode: `0x${string}` }>; `` A promise that resolves to an object containing the implementation address and bytecode. ## resolveAbiFromContractApi Resolves the ABI (Application Binary Interface) for a contract from the contract API. ### Example `import { createThirdwebClient, getContract } from "thirdweb"; import { resolveAbiFromContractApi } from "thirdweb/contract"; import { ethereum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "..." }); const myContract = getContract({ client, address: "...", chain: ethereum, }); const abi = await resolveAbiFromContractApi(myContract); ` ##### Signature `` function resolveAbiFromContractApi( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, contractApiBaseUrl: string, ): Promise; `` ### Parameters ##### contract The ThirdwebContract instance representing the contract. #### Type `` let contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; `` ##### contractApiBaseUrl The base URL of the contract API. Defaults to "https://contract.thirdweb.com/abi". #### Type `let contractApiBaseUrl: string; ` ### Returns ##### Return Type `let returnType: readonly Array<(AbiConstructor) | (AbiError) | (AbiEvent) | (AbiFallback) | (AbiFunction) | (AbiReceive)> ` A promise that resolves to the ABI of the contract. ## resolveScheme Resolves the scheme of a given URI and returns the corresponding URL. If the URI starts with "ipfs://", it constructs a URL using the IPFS client ID and the IPFS gateway. If the URI starts with "http", it returns the URI as is. Otherwise, it throws an error indicating an invalid URI scheme. ### Example `import { resolveScheme } from "thirdweb/storage"; const url = resolveScheme({ client, uri: "ipfs://Qm...", }); ` ##### Signature `function resolveScheme(options: [ResolveSchemeOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveSchemeOptions)): string; ` ### Parameters ##### options The options object containing the URI and the IPFS client. #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); uri: string }; ` ### Returns ##### Return Type `let returnType: string; ` The resolved URL. ## resolveSignatures Resolves the signatures of the given hexadecimal signatures. ### Example `import { resolveSignatures } from "thirdweb/utils"; const res = await resolveSignatures(["0x1f931c1c", "0x1f931c1c"]); console.log(res); ` ##### Signature `` function resolveSignatures( hexSigs: Array, ): Promise<{ events: Array<`event ${string}`>; functions: Array<`function ${string}`>; }>; `` ### Parameters ##### hexSigs An array of hexadecimal signatures. #### Type `let hexSigs: Array; ` ### Returns ##### Return Type `` let returnType: Promise<{ events: Array<`event ${string}`>; functions: Array<`function ${string}`>; }>; `` A promise that resolves to an object containing the resolved functions and events. ## encodeInstall Encodes the install data for the RoyaltyERC1155 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## roleMap A map of all current thirdweb's smart contract roles `let roleMap: { readonly admin: ""; readonly asset: "ASSET_ROLE"; readonly factory: "FACTORY_ROLE"; readonly lister: "LISTER_ROLE"; readonly metadata: "METADATA_ROLE"; readonly migration: "MIGRATION_ROLE"; readonly minter: "MINTER_ROLE"; readonly pauser: "PAUSER_ROLE"; readonly revoke: "REVOKE_ROLE"; readonly signer: "SIGNER_ROLE"; readonly transfer: "TRANSFER_ROLE"; readonly unwrap: "UNWRAP_ROLE"; }; ` ##### admin `type admin = ""; ` ##### asset `type asset = "ASSET_ROLE"; ` ##### factory `type factory = "FACTORY_ROLE"; ` ##### lister `type lister = "LISTER_ROLE"; ` ##### metadata `type metadata = "METADATA_ROLE"; ` ##### migration `type migration = "MIGRATION_ROLE"; ` ##### minter `type minter = "MINTER_ROLE"; ` ##### pauser `type pauser = "PAUSER_ROLE"; ` ##### revoke `type revoke = "REVOKE_ROLE"; ` ##### signer `type signer = "SIGNER_ROLE"; ` ##### transfer `type transfer = "TRANSFER_ROLE"; ` ##### unwrap `type unwrap = "UNWRAP_ROLE"; ` ## getDefaultRoyaltyInfo Calls the "getDefaultRoyaltyInfo" function on the contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const result = await RoyaltyERC1155.getDefaultRoyaltyInfo({ contract, }); ` ##### Signature `function getDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getDefaultRoyaltyInfo function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getRoyaltyInfoForToken Calls the "getRoyaltyInfoForToken" function on the contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const result = await RoyaltyERC1155.getRoyaltyInfoForToken({ contract, tokenId: ..., }); ` ##### Signature `function getRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>, ): Promise; ` ### Parameters ##### options The options for the getRoyaltyInfoForToken function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getTransferValidator Calls the "getTransferValidator" function on the contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const result = await RoyaltyERC1155.getTransferValidator({ contract, }); ` ##### Signature `function getTransferValidator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getTransferValidator function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getTransferValidationFunction Calls the "getTransferValidationFunction" function on the contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const result = await RoyaltyERC1155.getTransferValidationFunction({ contract, }); ` ##### Signature `` function getTransferValidationFunction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; `` ### Parameters ##### options The options for the getTransferValidationFunction function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise; `` The parsed result of the function call. ## install Installs the RoyaltyERC1155 module on a core contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const transaction = RoyaltyERC1155.install({ contract: coreContract, account: account, params: { royaltyRecipient: ..., royaltyBps: ..., transferValidator: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## royaltyInfo Calls the "royaltyInfo" function on the contract. ### Example `import { RoyaltyERC1155 } from "thirdweb/modules"; const result = await RoyaltyERC1155.royaltyInfo({ contract, tokenId: ..., salePrice: ..., }); ` ##### Signature `function royaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/RoyaltyInfoParams)>, ): Promise; ` ### Parameters ##### options The options for the royaltyInfo function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/RoyaltyInfoParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setDefaultRoyaltyInfo Prepares a transaction to call the "setDefaultRoyaltyInfo" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC1155 } from "thirdweb/modules"; const transaction = RoyaltyERC1155.setDefaultRoyaltyInfo({ contract, royaltyRecipient: ..., royaltyBps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setDefaultRoyaltyInfo" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## module Convenience function to add the RoyaltyERC1155 module as a default module on a core contract. ### Example `import { RoyaltyERC1155, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [ RoyaltyERC1155.module({ royaltyRecipient: ..., royaltyBps: ..., transferValidator: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## setRoyaltyInfoForToken Prepares a transaction to call the "setRoyaltyInfoForToken" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC1155 } from "thirdweb/modules"; const transaction = RoyaltyERC1155.setRoyaltyInfoForToken({ contract, tokenId: ..., recipient: ..., bps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setRoyaltyInfoForToken" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setTransferValidator Prepares a transaction to call the "setTransferValidator" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC1155 } from "thirdweb/modules"; const transaction = RoyaltyERC1155.setTransferValidator({ contract, validator: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferValidator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams) | { asyncParams: () => Promise<[SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferValidator" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams) | { asyncParams: () => Promise<[SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeInstall Encodes the install data for the RoyaltyERC721 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## getDefaultRoyaltyInfo Calls the "getDefaultRoyaltyInfo" function on the contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const result = await RoyaltyERC721.getDefaultRoyaltyInfo({ contract, }); ` ##### Signature `function getDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getDefaultRoyaltyInfo function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getRoyaltyInfoForToken Calls the "getRoyaltyInfoForToken" function on the contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const result = await RoyaltyERC721.getRoyaltyInfoForToken({ contract, tokenId: ..., }); ` ##### Signature `function getRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>, ): Promise; ` ### Parameters ##### options The options for the getRoyaltyInfoForToken function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/GetRoyaltyInfoForTokenParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getTransferValidationFunction Calls the "getTransferValidationFunction" function on the contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const result = await RoyaltyERC721.getTransferValidationFunction({ contract, }); ` ##### Signature `` function getTransferValidationFunction( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; `` ### Parameters ##### options The options for the getTransferValidationFunction function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise; `` The parsed result of the function call. ## getTransferValidator Calls the "getTransferValidator" function on the contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const result = await RoyaltyERC721.getTransferValidator({ contract, }); ` ##### Signature `function getTransferValidator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the getTransferValidator function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## install Installs the RoyaltyERC721 module on a core contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const transaction = RoyaltyERC721.install({ contract: coreContract, account: account, params: { royaltyRecipient: ..., royaltyBps: ..., transferValidator: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## module Convenience function to add the RoyaltyERC721 module as a default module on a core contract. ### Example `import { RoyaltyERC721, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [ RoyaltyERC721.module({ royaltyRecipient: ..., royaltyBps: ..., transferValidator: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## setDefaultRoyaltyInfo Prepares a transaction to call the "setDefaultRoyaltyInfo" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC721 } from "thirdweb/modules"; const transaction = RoyaltyERC721.setDefaultRoyaltyInfo({ contract, royaltyRecipient: ..., royaltyBps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setDefaultRoyaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setDefaultRoyaltyInfo" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams) | { asyncParams: () => Promise<[SetDefaultRoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/SetDefaultRoyaltyInfoParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## royaltyInfo Calls the "royaltyInfo" function on the contract. ### Example `import { RoyaltyERC721 } from "thirdweb/modules"; const result = await RoyaltyERC721.royaltyInfo({ contract, tokenId: ..., salePrice: ..., }); ` ##### Signature `function royaltyInfo( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/RoyaltyInfoParams)>, ): Promise; ` ### Parameters ##### options The options for the royaltyInfo function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[RoyaltyInfoParams](https://portal.thirdweb.com/references/typescript/v5/RoyaltyInfoParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setTransferValidator Prepares a transaction to call the "setTransferValidator" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC721 } from "thirdweb/modules"; const transaction = RoyaltyERC721.setTransferValidator({ contract, validator: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferValidator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams) | { asyncParams: () => Promise<[SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferValidator" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams) | { asyncParams: () => Promise<[SetTransferValidatorParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferValidatorParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setRoyaltyInfoForToken Prepares a transaction to call the "setRoyaltyInfoForToken" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { RoyaltyERC721 } from "thirdweb/modules"; const transaction = RoyaltyERC721.setRoyaltyInfoForToken({ contract, tokenId: ..., recipient: ..., bps: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setRoyaltyInfoForToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setRoyaltyInfoForToken" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams) | { asyncParams: () => Promise<[SetRoyaltyInfoForTokenParams](https://portal.thirdweb.com/references/typescript/v5/SetRoyaltyInfoForTokenParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## sendAndConfirmTransaction Sends a transaction using the provided wallet. ### Example #### Basic usage `import { sendAndConfirmTransaction } from "thirdweb"; const transactionReceipt = await sendAndConfirmTransaction({ account, transaction, }); ` #### Gasless usage with [ thirdweb Engine](https://portal.thirdweb.com/engine) `const transactionReceipt = await sendAndConfirmTransaction({ account, transaction, gasless: { provider: "engine", relayerUrl: "https://thirdweb.engine-***.thirdweb.com/relayer/***", relayerForwarderAddress: "0x...", }, }); ` #### Gasless usage with OpenZeppelin `const transactionReceipt = await sendAndConfirmTransaction({ account, transaction, gasless: { provider: "openzeppelin", relayerUrl: "https://...", relayerForwarderAddress: "0x...", }, }); ` ##### Signature `function sendAndConfirmTransaction( options: [SendTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/SendTransactionOptions), ): Promise<[TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt)>; ` ### Parameters ##### options The options for sending the transaction. #### Type `let options: { account: Account; gasless: GaslessOptions; transaction: PreparedTransaction; }; ` ### Returns ##### Return Type `let returnType: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` A promise that resolves to the confirmed transaction receipt. ## sendBatchTransaction Sends a batch transaction using the provided options. ### Example `import { sendBatchTransaction } from "thirdweb"; const waitForReceiptOptions = await sendBatchTransaction({ account, transactions, }); ` ##### Signature `` function sendBatchTransaction( options: [SendBatchTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/SendBatchTransactionOptions), ): Promise<{ chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }>; `` ### Parameters ##### options The options for sending the batch transaction. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transactions: Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }>; `` A promise that resolves to the options for waiting for the receipt of the first transaction in the batch. ## sendTransaction Sends a transaction using the provided account. You can send a transaction with a [ prepared contract call](https://portal.thirdweb.com/references/typescript/v5/prepareContractCall) , a [ prepared transaction](https://portal.thirdweb.com/references/typescript/v5/prepareTransaction) , or using a write [ Extension](https://portal.thirdweb.com/typescript/v5/extensions/use) . ### Example #### Using a prepared contract call `import { sendTransaction, getContract, prepareContractCall, } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const contract = getContract({ address: "0x...", chain: sepolia, client, }); const transaction = prepareContractCall({ contract, method: "function transfer(address to, uint256 value)", params: [to, value], }); const { transactionHash } = await sendTransaction({ account, transaction, }); ` #### Using a write extension `import { sendTransaction, getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { mintTo } from "thirdweb/extensions/erc721"; const contract = getContract({ address: "0x...", chain: sepolia, client, }); const transaction = mintTo({ contract, to: "0x...", nft: { name: "NFT Name", description: "NFT Description", image: "https://example.com/image.png", }, }); const { transactionHash } = await sendTransaction({ account, transaction, }); ` #### Using a prepared transaction `import { sendTransaction, getContract, prepareTransaction, } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const contract = getContract({ address: "0x...", chain: sepolia, client, }); const transaction = prepareTransaction({ contract, to: "0x...", value: toWei("0.1"), }); const { transactionHash } = await sendTransaction({ account, transaction, }); ` #### Send an EIP-7702 Transaction _Note: This feature is in beta and is subject to breaking changes_ `import { sendTransaction, prepareTransaction, signAuthorization, } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const authorization = await signAuthorization({ request: { address: "0x...", chainId: 1, nonce: 0n, }, account: myAccount, }); const transaction = prepareTransaction({ chain: sepolia, client: client, to: "0x...", value: 0n, authorizationList: [authorization], }); const { transactionHash } = await sendTransaction({ account, transaction, }); ` #### Gasless usage with [ thirdweb Engine](https://portal.thirdweb.com/engine) `const { transactionHash } = await sendTransaction({ account, transaction, gasless: { provider: "engine", relayerUrl: "https://thirdweb.engine-***.thirdweb.com/relayer/***", relayerForwarderAddress: "0x...", }, }); ` #### Gasless usage with OpenZeppelin `const { transactionHash } = await sendTransaction({ account, transaction, gasless: { provider: "openzeppelin", relayerUrl: "https://...", relayerForwarderAddress: "0x...", }, }); ` ##### Signature `` function sendTransaction( options: [SendTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/SendTransactionOptions), ): Promise<{ chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }>; `` ### Parameters ##### options The options for sending the transaction. #### Type `let options: { account: Account; gasless: GaslessOptions; transaction: PreparedTransaction; }; ` ### Returns ##### Return Type `` let returnType: Promise<{ chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }>; `` A promise that resolves to the transaction result. ## resolveMethod Resolves and returns the ABI function with the specified method name. Throws an error if the function is not found in the ABI. ### Example `import { resolveMethod, prepareContractCall } from "thirdweb"; const tx = prepareContractCall({ contract, // automatically resolves the necessary abi to encode the transaction method: resolveMethod("transfer"), // however there is no type completion for params in this case (as the resolution is async and happens at runtime) params: [to, value], }); ` ##### Signature `` function resolveMethod( method: string, ): ( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, ) => Promise; `` ### Parameters ##### method The name of the method to resolve. #### Type `let method: string; ` ### Returns ##### Return Type `` let returnType: ( contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>, ) => Promise; `` The resolved ABI function. ## resolveSignature Resolves a signature by converting a hexadecimal string into a function or event signature. ### Example `import { resolveSignature } from "thirdweb/utils"; const res = await resolveSignature("0x1f931c1c"); console.log(res); ` ##### Signature `` function resolveSignature( hexSig: string, ): Promise<{ event: null | `event ${string}`; function: null | `function ${string}`; }>; `` ### Parameters ##### hexSig The hexadecimal signature to resolve. #### Type `let hexSig: string; ` ### Returns ##### Return Type `` let returnType: Promise<{ event: null | `event ${string}`; function: null | `function ${string}`; }>; `` A promise that resolves to an object containing the function and event signatures. ## encodeInstall Encodes the install data for the SequentialTokenIdERC1155 module. ##### Signature `` function encodeInstall( params: EncodeBytesOnInstallParams, ): `0x${string}`; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` * The encoded data. ## install Installs the SequentialTokenIdERC1155 module on a core contract. ### Example `import { SequentialTokenIdERC1155 } from "thirdweb/modules"; const transaction = SequentialTokenIdERC1155.install({ contract: coreContract, account: account, params: { startTokenId: ..., }, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params: EncodeBytesOnInstallParams & { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## module Convenience function to add the SequentialTokenIdERC1155 module as a default module on a core contract. ### Example `import { SequentialTokenIdERC1155, deployModularContract } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [ SequentialTokenIdERC1155.module({ startTokenId: ..., }), ], }); ` ##### Signature `` function module( params: EncodeBytesOnInstallParams & { publisher?: string }, ): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` ### Parameters ##### params The parameters for the module. #### Type `let params: EncodeBytesOnInstallParams & { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: `0x${string}`; module: `0x${string}` }>; `` * The module function. ## serializeErc6492Signature ### Example `import { serializeErc6492Signature } from "thirdweb/auth"; const serializedSignature = serializeErc6492Signature({ address: "0x...", data: "0x...", signature: "0x...", }); // 0x000000000000000000000000cafebabecafebabecafebabecafebabecafebabe000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041a461f509887bd19e312c0c58467ce8ff8e300d3c1a90b608a760c5b80318eaf15fe57c96f9175d6cd4daad4663763baa7e78836e067d0163e9a2ccf2ff753f5b1b000000000000000000000000000000000000000000000000000000000000006492649264926492649264926492649264926492649264926492649264926492 ` ##### Signature `` function serializeErc6492Signature( __namedParameters: [Erc6492Signature](https://portal.thirdweb.com/references/typescript/v5/Erc6492Signature), ): `0x${string}`; `` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: { address: string; data: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); signature: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The serialized signature ## serializeTransaction Serializes a legacy, EIP-1559, EIP-2930, EIP-4844, or EIP-7702 transaction object. ### Example `import { serializeTransaction } from "thirdweb"; const serializedTransaction = serializeTransaction({ transaction: { to: "0x", value: 0n, }, }); ` ##### Signature `` function serializeTransaction( options: [SerializeTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/SerializeTransactionOptions), ): `0x${string}`; `` ### Parameters ##### options The serialization options. #### Type `let options: { signature?: | ox__Signature.Signature | ox__Signature.Legacy<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex), bigint>; transaction: SerializableTransaction; }; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The serialized transaction. ## sha256 Calculates the SHA256 hash of the given value. ### Example `import { sha256 } from "thirdweb/utils"; const hash = sha256("0x1234"); ` ##### Signature `` function sha256( value: `0x${string}` | Uint8Array, to?: TTo, ): Sha256Hash; `` ### Parameters ##### value The value to hash. It can be either a hexadecimal string or a Uint8Array. #### Type `` let value: `0x${string}` | Uint8Array; `` ##### to optional (Optional) The desired output format of the hash. Defaults to 'hex'. #### Type `let to: TTo; ` ### Returns ##### Return Type `let returnType: Sha256Hash; ` The SHA256 hash of the value in the specified format. ## prepareTransaction Prepares a transaction with the given options. ### Example `import { prepareTransaction, toWei } from "thirdweb"; import { ethereum } from "thirdweb/chains"; const transaction = prepareTransaction({ to: "0x1234567890123456789012345678901234567890", chain: ethereum, client: thirdwebClient, value: toWei("1.0"), gasPrice: 30n, }); ` ##### Signature `function prepareTransaction( options: [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions), info?: Additional, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for preparing the transaction. #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); } & PromisedObject< Omit >; ` ##### info optional Additional information about the ABI function. #### Type `let info: Additional; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< abi, abiFn, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The prepared transaction. ## shortenAddress Checksums and formats an address if valid. Note this function does not check if the provided address is an ENS. ### Example `import { shortenAddress } from "thirdweb/utils"; shortenAddress("0xa0cf798816d4b9b9866b5330eea46a18382f251e"); //=> '0xA0Cf...251e' ` ##### Signature `function shortenAddress(address: string, length: number): string; ` ### Parameters ##### address The address to shorten. #### Type `let address: string; ` ##### length The number of characters to keep from the start and end of the address. #### Type `let length: number; ` ### Returns ##### Return Type `let returnType: string; ` The shortened address. ## shortenHex Shortens a hexadecimal string without performing any validation or checksumming. ### Example `import { shortenHex } from "thirdweb/utils"; shortenHex("0xa0cf798816d4b9b9866b5330eea46a18382f251e"); //=> '0xa0cf...251e' ` ##### Signature `function shortenHex(hex: string, length: number): string; ` ### Parameters ##### hex The hexadecimal string to shorten. #### Type `let hex: string; ` ##### length The number of characters to keep from the start and end of the string. #### Type `let length: number; ` ### Returns ##### Return Type `let returnType: string; ` The shortened hexadecimal string. ## shortenLargeNumber Shorten the string for large value Mainly used for Examples: 10\_000 -> 10k 1\_000\_000 -> 1M 1\_000\_000\_000 -> 1B ### Example `import { shortenLargeNumber } from "thirdweb/utils"; const numStr = shortenLargeNumber(1_000_000_000); ` ##### Signature `function shortenLargeNumber(value: number): string; ` ### Parameters ##### value #### Type `let value: number; ` ### Returns ##### Return Type `let returnType: string; ` ## shouldUpdateSessionKey Checks if the session key should be updated. ##### Signature `function shouldUpdateSessionKey(args: { accountContract: Readonly; newPermissions: AccountPermissions; sessionKeyAddress: string; }): Promise; ` ### Parameters ##### args #### Type `let args: { accountContract: Readonly; newPermissions: AccountPermissions; sessionKeyAddress: string; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating if the session key should be updated. ## sign Generates the signature for the provided transaction hash. ### Example `import { sign } from "thirdweb/utils"; const signature = sign({ hash: "0x", privateKey: "0x", }); ` ##### Signature `` function sign(options: [SignOptions](https://portal.thirdweb.com/references/typescript/v5/SignOptions)): { r: `0x${string}`; s: `0x${string}`; v: bigint; yParity: number; }; `` ### Parameters ##### options The options for signing. #### Type `let options: { hash: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` ### Returns ##### Return Type `` let returnType: { r: `0x${string}`; s: `0x${string}`; v: bigint; yParity: number; }; `` The transaction signature. ## signAuthorization Sign the given EIP-7702 authorization object. ##### Signature `function signAuthorization(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); request: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest); }): Promise<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; ` ### Parameters ##### options The options for `signAuthorization`Refer to the type [SignAuthorizationOptions](https://portal.thirdweb.com/references/typescript/v5/SignAuthorizationOptions) #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); request: [AuthorizationRequest](https://portal.thirdweb.com/references/typescript/v5/AuthorizationRequest) }; ` ### Returns ##### Return Type `let returnType: Promise<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; ` The signed authorization object `import { signAuthorization } from "thirdweb"; const authorization = await signAuthorization({ request: { address: "0x...", chainId: 911867, nonce: 100n, }, account: myAccount, }); ` ## signLoginPayload Signs the login payload using the provided account. ### Example `import { signLoginPayload } from "thirdweb/auth"; const { signature, payload } = await signLoginPayload({ payload: loginPayload, account: account, }); ` ##### Signature `` function signLoginPayload( options: [SignLoginPayloadParams](https://portal.thirdweb.com/references/typescript/v5/SignLoginPayloadParams), ): Promise<{ payload: [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload); signature: `0x${string}` }>; `` ### Parameters ##### options The options for signing the login payload. #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); payload: [LoginPayload](https://portal.thirdweb.com/references/typescript/v5/LoginPayload) }; ` ### Returns ##### Return Type `let returnType: { address: string; chain_id?: string; domain: string; expiration_time: string; invalid_before: string; issued_at: string; nonce: string; resources?: Array; statement: string; uri?: string; version: string; }; ` An object containing the signature and the payload. ## signMessage ### Signature#1 Signs a string message with a given private key. #### Example `import { signMessage } from "thirdweb/utils"; signMessage({ message: "Hello, world!", privateKey: "0x...", }); ` ##### Signature `` function signMessage(options: [SignMessageOptions](https://portal.thirdweb.com/references/typescript/v5/SignMessageOptions)): `0x${string}`; `` #### Parameters ##### options The options for signing. ##### Type `let options: { message: Message; privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) }; ` #### Returns ##### Return Type `` let returnType: `0x${string}`; `` The signature as a hex string ### Signature#2 Signs a string message with a given account. #### Example `import { signMessage } from "thirdweb/utils"; await signMessage({ message: "Hello, world!", account, }); ` ##### Signature `` function signMessage(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: Message; }): Promise<`0x${string}`>; `` #### Parameters ##### options The options for signing. ##### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); message: Message }; ` #### Returns ##### Return Type `` let returnType: Promise<`0x${string}`>; `` The signature as a hex string ## signTransaction Signs a transaction to be sent to a node. ### Example `import { signTransaction } from "thirdweb"; signTransaction({ transaction: { ... }, privateKey: "0x...", }); ` ##### Signature `` function signTransaction( options: [SignTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/SignTransactionOptions), ): `0x${string}`; `` ### Parameters ##### options The options for signing. #### Type `let options: { privateKey: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex); transaction: SerializableTransaction; }; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The signed transaction as a hex string ## signTypedData Signs a typed data object with a given private key according to EIP712. ### Example `import { signTypedData } from "thirdweb/utils"; signTypedData({ privateKey: "0x...", ...typedData, }); ` ##### Signature `` function signTypedData( options: [SignTypedDataOptions](https://portal.thirdweb.com/references/typescript/v5/SignTypedDataOptions), ): `0x${string}`; `` ### Parameters ##### options The typed data is passed within options alongside the private key #### Type `let options: [SignTypedDataOptions](https://portal.thirdweb.com/references/typescript/v5/SignTypedDataOptions); ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The signature as a hex string ## signatureToHex Converts a signature to a hex string. ### Example `import { signatureToHex } from "thirdweb/utils"; const hex = signatureToHex({ r: toHex( 49782753348462494199823712700004552394425719014458918871452329774910450607807n, ), s: toHex( 33726695977844476214676913201140481102225469284307016937915595756355928419768n, ), v: 28n, }); console.log(hex); // "0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db81c" ` ##### Signature `` function signatureToHex(signature: { r: `0x${string}`; s: `0x${string}`; v?: number | bigint | `0x${string}`; yParity?: number | bigint | `0x${string}`; }): `0x${string}`; `` ### Parameters ##### signature The signature to convert. #### Type `` let signature: { r: `0x${string}`; s: `0x${string}`; v?: number | bigint | `0x${string}`; yParity?: number | bigint | `0x${string}`; }; `` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hex string representation of the signature. ## signUserOp Sign a user operation. ### Example `import { signUserOp } from "thirdweb/wallets/smart"; const userOp = await createUnsignedUserOp(...); const signedUserOp = await signUserOp({ client, userOp, chain, adminAccount, }); ` ##### Signature `function signUserOp(args: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; userOp: UserOperationV06 | UserOperationV07; }): Promise; ` ### Parameters ##### args #### Type `let args: { adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); entrypointAddress?: string; userOp: UserOperationV06 | UserOperationV07; }; ` ### Returns ##### Return Type `let returnType: Promise; ` * The user operation with the signature field populated ## simulateTransaction Simulates the execution of a transaction. ### Example `import { simulateTransaction } from "thirdweb"; const result = await simulateTransaction({ transaction, }); ` ##### Signature `function simulateTransaction( options: [SimulateOptions](https://portal.thirdweb.com/references/typescript/v5/SimulateOptions), ): Promise; ` ### Parameters ##### options The options for simulating the transaction. #### Type `let options: [SimulateOptions](https://portal.thirdweb.com/references/typescript/v5/SimulateOptions); ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to the result of the simulation. ## smartWallet Creates a ERC4337 smart wallet based on a admin account. Smart wallets are smart contract wallets that enable multiple benefits for users: * Sponsor gas fees for transactions * Multiple owners * Session keys * Batch transactions * Predictable addresses * Programmable features [ Learn more about account abstraction](https://portal.thirdweb.com/connect/account-abstraction/how-it-works) ### Example ### Connect to a smart wallet To connect to a smart wallet, you need to provide an admin account as the `personalAccount` option. Any wallet can be used as an admin account, including an in-app wallets. The `sponsorGas` option is used to enable sponsored gas for transactions automatically. `import { smartWallet, inAppWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; import { sendTransaction } from "thirdweb"; const wallet = smartWallet({ chain: sepolia, sponsorGas: true, // enable sponsored transactions }); // any wallet can be used as an admin account // in this example we use an in-app wallet const adminWallet = inAppWallet(); const personalAccount = await adminWallet.connect({ client, chain: sepolia, strategy: "google", }); const smartAccount = await wallet.connect({ client, personalAccount, // pass the admin account }); // sending sponsored transactions with the smartAccount await sendTransaction({ account: smartAccount, transaction, }); ` ### Using a custom account factory You can pass a custom account factory to the `smartWallet` function to use a your own account factory. `import { smartWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; const wallet = smartWallet({ chain: sepolia, sponsorGas: true, // enable sponsored transactions factoryAddress: "0x...", // custom factory address }); ` ### Using v0.7 Entrypoint Both v0.6 (default) and v0.7 ERC4337 Entrypoints are supported. To use the v0.7 Entrypoint, simply pass in a compatible account factory. You can use the predeployed `DEFAULT_ACCOUNT_FACTORY_V0_7` or deploy your own [ AccountFactory v0.7](https://thirdweb.com/thirdweb.eth/AccountFactory%5F0%5F7) . `import { smartWallet, DEFAULT_ACCOUNT_FACTORY_V0_7, } from "thirdweb/wallets/smart"; import { sepolia } from "thirdweb/chains"; const wallet = smartWallet({ chain: sepolia, sponsorGas: true, // enable sponsored transactions factoryAddress: DEFAULT_ACCOUNT_FACTORY_V0_7, // 0.7 factory address }); ` ### Configuring the smart wallet You can pass options to the `smartWallet` function to configure the smart wallet. `import { smartWallet } from "thirdweb/wallets"; import { sepolia } from "thirdweb/chains"; const wallet = smartWallet({ chain: sepolia, sponsorGas: true, // enable sponsored transactions factoryAddress: "0x...", // custom factory address overrides: { accountAddress: "0x...", // override account address accountSalt: "0x...", // override account salt entrypointAddress: "0x...", // override entrypoint address tokenPaymaster: TokenPaymaster.BASE_USDC, // enable erc20 paymaster bundlerUrl: "https://...", // override bundler url paymaster: (userOp) => { ... }, // override paymaster ... } }); ` Refer to [ SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions) for more details. ##### Signature `function smartWallet( createOptions: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions), ): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"smart">; ` ### Parameters ##### createOptions The options for creating the wallet. Refer to [ SmartWalletCreationOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletCreationOptions) for more details. #### Type `let createOptions: Prettify< { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); factoryAddress?: string; overrides?: { accountAddress?: string; accountSalt?: string; bundlerUrl?: string; createAccount?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); entrypointAddress?: string; execute?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transaction: SendTransactionOption, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); executeBatch?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), transactions: Array, ) => [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); getAccountNonce?: ( accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), ) => Promise; paymaster?: ( userOp: UserOperationV06 | UserOperationV07, ) => Promise<[PaymasterResult](https://portal.thirdweb.com/references/typescript/v5/PaymasterResult)>; predictAddress?: ( factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract), admin: string, ) => Promise; signMessage?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); message: SignableMessage; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; signTypedData?: (options: { accountContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); adminAccount: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); factoryContract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); typedData: ox__TypedData.Definition; }) => Promise<[Hex](https://portal.thirdweb.com/references/typescript/v5/Hex)>; tokenPaymaster?: TokenPaymasterConfig; }; sessionKey?: { address: string; permissions: AccountPermissions }; } & ({ gasless: boolean } | { sponsorGas: boolean }) >; ` ### Returns ##### Return Type `let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"smart">; ` The created smart wallet. ## distributeByToken This extension is similar to the `distribute` extension, however it require you to specify the token (address) that you want to distribute ### Example `import { distributeByToken } from "thirdweb/extensions/split"; const transaction = distributeByToken(); // Send the transaction ... ` ##### Signature `function distributeByToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ tokenAddress: string }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, { readonly inputs: readonly [ { readonly name: "token"; readonly type: "address" }, ]; readonly name: "distribute"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ tokenAddress: string }>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, { readonly inputs: readonly [ { readonly name: "token"; readonly type: "address" }, ]; readonly name: "distribute"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## distribute Prepares a transaction to call the "distribute" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { distribute } from "thirdweb/extensions/split"; const transaction = distribute(); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function distribute( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "distribute" function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getAllRecipientsAddresses Get the addresses of all recipients of a [thirdweb Split contract](https://thirdweb.com/thirdweb.eth/Split) ### Example `import { getAllRecipientsAddresses } from "thirdweb/extensions/split"; const addresses = await getAllRecipientsAddresses({ contract }); ` ##### Signature `function getAllRecipientsAddresses( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise>; ` an array of wallet addresses ## getRecipientSplitPercentage Get the split percentage of a recipient ### Example `import { getRecipientSplitPercentage } from "thirdweb/extensions/split"; const percentage = await getRecipientSplitPercentage({ recipientAddress: "0x...", }); ` ##### Signature `function getRecipientSplitPercentage( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ recipientAddress: string }>, ): Promise<[SplitRecipient](https://portal.thirdweb.com/references/typescript/v5/SplitRecipient)>; ` ### Parameters ##### options The options for the transaction #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ recipientAddress: string }>; ` ### Returns ##### Return Type `let returnType: { address: string; splitPercentage: number }; ` The split percentage of the recipient ## payee Calls the "payee" function on the contract. ### Example `import { payee } from "thirdweb/extensions/split"; const result = await payee({ contract, index: ..., }); ` ##### Signature `function payee( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PayeeParams](https://portal.thirdweb.com/references/typescript/v5/PayeeParams)>, ): Promise; ` ### Parameters ##### options The options for the payee function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PayeeParams](https://portal.thirdweb.com/references/typescript/v5/PayeeParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getAllRecipientsPercentages Get all the recipients of a Split contracts ### Example `import { getAllRecipientsPercentages } from "thirdweb/extensions/split"; const allRecipients = await getAllRecipientsPercentages({ contract }); // Example result: [ { address: "0x1...", splitPercentage: 25, // 25% }, { address: "0x2...", splitPercentage: 75, // 75% }, ]; ` ##### Signature `function getAllRecipientsPercentages( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: { address: string; splitPercentage: number }; ` an array of recipients' addresses and split percentage of each ## releasable Calls the "releasable" function on the contract. ### Example `import { releasable } from "thirdweb/extensions/split"; const result = await releasable({ contract, account: ..., }); ` ##### Signature `function releasable( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasableParams](https://portal.thirdweb.com/references/typescript/v5/ReleasableParams)>, ): Promise; ` ### Parameters ##### options The options for the releasable function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasableParams](https://portal.thirdweb.com/references/typescript/v5/ReleasableParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## payeeCount Calls the "payeeCount" function on the contract. ### Example `import { payeeCount } from "thirdweb/extensions/split"; const result = await payeeCount({ contract, }); ` ##### Signature `function payeeCount(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the payeeCount function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## releasableByToken Calls the "releasable" function on the contract. ### Example `import { releasableByToken } from "thirdweb/extensions/split"; const result = await releasableByToken({ contract, account: ..., }); ` ##### Signature `function releasableByToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasableByTokenParams](https://portal.thirdweb.com/references/typescript/v5/ReleasableByTokenParams)>, ): Promise; ` ### Parameters ##### options The options for the releasable function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasableByTokenParams](https://portal.thirdweb.com/references/typescript/v5/ReleasableByTokenParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## releaseByToken Similar to the `release` extension, however this one requires you to specify a tokenAddress to release ### Example `import { releaseByToken } from "thirdweb/extensions/split"; const transaction = releaseByToken({ contract, account: ..., overrides: { ... } }); // Send the transaction ... ` ##### Signature `function releaseByToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleaseByTokenParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseByTokenParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, { readonly inputs: readonly [ { readonly name: "token"; readonly type: "address" }, { readonly name: "account"; readonly type: "address" }, ]; readonly name: "release"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleaseByTokenParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseByTokenParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, { readonly inputs: readonly [ { readonly name: "token"; readonly type: "address" }, { readonly name: "account"; readonly type: "address" }, ]; readonly name: "release"; readonly outputs: readonly []; readonly stateMutability: "nonpayable"; readonly type: "function"; }, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` ## release Prepares a transaction to call the "release" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { release } from "thirdweb/extensions/split"; const transaction = release({ contract, account: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function release( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ReleaseParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseParams) | { asyncParams: () => Promise<[ReleaseParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "release" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ReleaseParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseParams) | { asyncParams: () => Promise<[ReleaseParams](https://portal.thirdweb.com/references/typescript/v5/ReleaseParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## released Calls the "released" function on the contract. ### Example `import { released } from "thirdweb/extensions/split"; const result = await released({ contract, account: ..., }); ` ##### Signature `function released( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasedParams](https://portal.thirdweb.com/references/typescript/v5/ReleasedParams)>, ): Promise; ` ### Parameters ##### options The options for the released function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReleasedParams](https://portal.thirdweb.com/references/typescript/v5/ReleasedParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## releasedByToken Calls the "released" function on the contract. Similar to the `released` extension, however this one requires you to specify a tokenAddress ### Example `import { releasedByToken } from "thirdweb/extensions/split"; const result = await releasedByToken({ contract, account: "0x...", tokenAddress: "0x...", }); ` ##### Signature `function releasedByToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ReleasedParams](https://portal.thirdweb.com/references/typescript/v5/ReleasedParams) & { tokenAddress: string } >, ): Promise; ` ### Parameters ##### options The options for the released function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ReleasedParams](https://portal.thirdweb.com/references/typescript/v5/ReleasedParams) & { tokenAddress: string } >; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## shares Calls the "shares" function on the contract. ### Example `import { shares } from "thirdweb/extensions/split"; const result = await shares({ contract, account: ..., }); ` ##### Signature `function shares( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SharesParams](https://portal.thirdweb.com/references/typescript/v5/SharesParams)>, ): Promise; ` ### Parameters ##### options The options for the shares function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[SharesParams](https://portal.thirdweb.com/references/typescript/v5/SharesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## totalReleased Calls the "totalReleased" function on the contract. ### Example `import { totalReleased } from "thirdweb/extensions/split"; const result = await totalReleased({ contract, }); ` ##### Signature `function totalReleased( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the totalReleased function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## stringToBytes Converts a string to an array of bytes. ### Example `import { stringToBytes } from "thirdweb/utils"; const bytes = stringToBytes("Hello, world!"); console.log(bytes); // Uint8Array(13) [ 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33 ] ` ##### Signature `function stringToBytes( value: string, opts: [StringToBytesOpts](https://portal.thirdweb.com/references/typescript/v5/StringToBytesOpts), ): Uint8Array; ` ### Parameters ##### value The string to convert. #### Type `let value: string; ` ##### opts Optional parameters for the conversion. #### Type `let opts: { size?: number }; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The array of bytes representing the string. ## stringToHex Converts a string to its hexadecimal representation. ### Example `import { stringToHex } from "thirdweb/utils"; const hex = stringToHex("Hello, world!"); console.log(hex); // "0x48656c6c6f2c20776f726c6421" ` ##### Signature `` function stringToHex(value_: string, opts: Options): `0x${string}`; `` ### Parameters ##### value\_ The string to convert to hexadecimal. #### Type `let value_: string; ` ##### opts Options for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hexadecimal representation of the input string. ## totalReleasedByToken Calls the "totalReleased" function on the contract. Similar to the `release` extension, however this one requires you to specify a tokenAddress ### Example `import { totalReleasedByToken } from "thirdweb/extensions/split"; const result = await totalReleasedByToken({ contract, tokenAddress: "0x...", }); ` ##### Signature `function totalReleasedByToken( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ tokenAddress: string }>, ): Promise; ` ### Parameters ##### options The options for the totalReleased function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ tokenAddress: string }>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## contractType Calls the "contractType" function on the contract. ### Example `import { contractType } from "thirdweb/extensions/thirdweb"; const result = await contractType({ contract, }); ` ##### Signature `function contractType( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the contractType function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## add Prepares a transaction to call the "add" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { add } from "thirdweb/extensions/thirdweb"; const transaction = add({ contract, deployer: ..., deployment: ..., chainId: ..., metadataUri: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function add( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams) | { asyncParams: () => Promise<[AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "add" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams) | { asyncParams: () => Promise<[AddParams](https://portal.thirdweb.com/references/typescript/v5/AddParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## stringify Stringify a JSON object and convert all bigint values to string If you are getting this error: "Exception: Do not know how to serialize a BigInt", you probably can use this function to parse the data. Because bigint is not an accepted value of the JSON format. ### Example `import { stringify } from "thirdweb/utils"; const obj = { tokenId: 0n }; const str = stringify(obj); // "{"tokenId":"0"}" ` ##### Signature `function stringify( value: any, replacer?: null | ((this: any, key: string, value: any) => any), space?: string | number, ): string; ` ### Parameters ##### value #### Type `let value: any; ` ##### replacer optional #### Type `let replacer: null | ((this: any, key: string, value: any) => any); ` ##### space optional #### Type `let space: string | number; ` ### Returns ##### Return Type `let returnType: string; ` An object with all bigint values converted to string ## deployProxyByImplementation Prepares a transaction to call the "deployProxyByImplementation" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { deployProxyByImplementation } from "thirdweb/extensions/thirdweb"; const transaction = deployProxyByImplementation({ contract, implementation: ..., data: ..., salt: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function deployProxyByImplementation( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [DeployProxyByImplementationParams](https://portal.thirdweb.com/references/typescript/v5/DeployProxyByImplementationParams) | { asyncParams: () => Promise<[DeployProxyByImplementationParams](https://portal.thirdweb.com/references/typescript/v5/DeployProxyByImplementationParams)>; } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "deployProxyByImplementation" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [DeployProxyByImplementationParams](https://portal.thirdweb.com/references/typescript/v5/DeployProxyByImplementationParams) | { asyncParams: () => Promise<[DeployProxyByImplementationParams](https://portal.thirdweb.com/references/typescript/v5/DeployProxyByImplementationParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## count Calls the "count" function on the contract. ### Example `import { count } from "thirdweb/extensions/thirdweb"; const result = await count({ contract, deployer: ..., }); ` ##### Signature `function count( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CountParams](https://portal.thirdweb.com/references/typescript/v5/CountParams)>, ): Promise; ` ### Parameters ##### options The options for the count function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[CountParams](https://portal.thirdweb.com/references/typescript/v5/CountParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getAll Calls the "getAll" function on the contract. ### Example `import { getAll } from "thirdweb/extensions/thirdweb"; const result = await getAll({ contract, deployer: ..., }); ` ##### Signature `function getAll(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllParams](https://portal.thirdweb.com/references/typescript/v5/GetAllParams)>) : Promise> ` ### Parameters ##### options The options for the getAll function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllParams](https://portal.thirdweb.com/references/typescript/v5/GetAllParams)>; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## getPublishedContractVersions Calls the "getPublishedContractVersions" function on the contract. ### Example `import { getPublishedContractVersions } from "thirdweb/extensions/thirdweb"; const result = await getPublishedContractVersions({ contract, publisher: ..., contractId: ..., }); ` ##### Signature `` function getPublishedContractVersions(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedContractVersionsParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedContractVersionsParams)>) : Promise> `` ### Parameters ##### options The options for the getPublishedContractVersions function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedContractVersionsParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedContractVersionsParams)>; ` ### Returns ##### Return Type `` let returnType: Promise> `` The parsed result of the function call. ## getAllPublishedContracts Calls the "getAllPublishedContracts" function on the contract. ### Example `import { getAllPublishedContracts } from "thirdweb/extensions/thirdweb"; const result = await getAllPublishedContracts({ contract, publisher: ..., }); ` ##### Signature `` function getAllPublishedContracts(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllPublishedContractsParams](https://portal.thirdweb.com/references/typescript/v5/GetAllPublishedContractsParams)>) : Promise> `` ### Parameters ##### options The options for the getAllPublishedContracts function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetAllPublishedContractsParams](https://portal.thirdweb.com/references/typescript/v5/GetAllPublishedContractsParams)>; ` ### Returns ##### Return Type `` let returnType: Promise> `` The parsed result of the function call. ## getPublishedContract Calls the "getPublishedContract" function on the contract. ### Example `import { getPublishedContract } from "thirdweb/extensions/thirdweb"; const result = await getPublishedContract({ contract, publisher: ..., contractId: ..., }); ` ##### Signature `` function getPublishedContract( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedContractParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedContractParams)>, ): Promise<{ bytecodeHash: `0x${string}`; contractId: string; implementation: string; publishMetadataUri: string; publishTimestamp: bigint; }>; `` ### Parameters ##### options The options for the getPublishedContract function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedContractParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedContractParams)>; ` ### Returns ##### Return Type `` let returnType: Promise<{ bytecodeHash: `0x${string}`; contractId: string; implementation: string; publishMetadataUri: string; publishTimestamp: bigint; }>; `` The parsed result of the function call. ## getPublishedUriFromCompilerUri Calls the "getPublishedUriFromCompilerUri" function on the contract. ### Example `import { getPublishedUriFromCompilerUri } from "thirdweb/extensions/thirdweb"; const result = await getPublishedUriFromCompilerUri({ contract, compilerMetadataUri: ..., }); ` ##### Signature `function getPublishedUriFromCompilerUri(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedUriFromCompilerUriParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedUriFromCompilerUriParams)>) : Promise> ` ### Parameters ##### options The options for the getPublishedUriFromCompilerUri function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublishedUriFromCompilerUriParams](https://portal.thirdweb.com/references/typescript/v5/GetPublishedUriFromCompilerUriParams)>; ` ### Returns ##### Return Type `let returnType: Promise> ` The parsed result of the function call. ## getPublisherProfileUri Calls the "getPublisherProfileUri" function on the contract. ### Example `import { getPublisherProfileUri } from "thirdweb/extensions/thirdweb"; const result = await getPublisherProfileUri({ contract, publisher: ..., }); ` ##### Signature `function getPublisherProfileUri( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/GetPublisherProfileUriParams)>, ): Promise; ` ### Parameters ##### options The options for the getPublisherProfileUri function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/GetPublisherProfileUriParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## publishContract Publish a contract to the contract publisher. ### Example `const tx = publishContract({ contract, account, metadata, }); ` ##### Signature `function publishContract( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PublishContractParams](https://portal.thirdweb.com/references/typescript/v5/PublishContractParams)>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for publishing the contract. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[PublishContractParams](https://portal.thirdweb.com/references/typescript/v5/PublishContractParams)>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` The transaction to publish the contract. ## remove Prepares a transaction to call the "remove" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { remove } from "thirdweb/extensions/thirdweb"; const transaction = remove({ contract, deployer: ..., deployment: ..., chainId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function remove( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams) | { asyncParams: () => Promise<[RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "remove" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams) | { asyncParams: () => Promise<[RemoveParams](https://portal.thirdweb.com/references/typescript/v5/RemoveParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setPublisherProfileUri Prepares a transaction to call the "setPublisherProfileUri" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setPublisherProfileUri } from "thirdweb/extensions/thirdweb"; const transaction = setPublisherProfileUri({ contract, publisher: ..., uri: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setPublisherProfileUri( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/SetPublisherProfileUriParams) | { asyncParams: () => Promise<[SetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/SetPublisherProfileUriParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setPublisherProfileUri" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/SetPublisherProfileUriParams) | { asyncParams: () => Promise<[SetPublisherProfileUriParams](https://portal.thirdweb.com/references/typescript/v5/SetPublisherProfileUriParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## isContractTypeSupported Checks if the `contractType` method is supported by the given contract. ### Example `import { isContractTypeSupported } from "thirdweb/extensions/thirdweb"; const supported = isContractTypeSupported(["0x..."]); ` ##### Signature `function isContractTypeSupported( availableSelectors: Array, ): boolean; ` ### Parameters ##### availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors. #### Type `let availableSelectors: Array; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the `contractType` method is supported. ## unpublishContract Prepares a transaction to call the "unpublishContract" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { unpublishContract } from "thirdweb/extensions/thirdweb"; const transaction = unpublishContract({ contract, publisher: ..., contractId: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function unpublishContract( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UnpublishContractParams](https://portal.thirdweb.com/references/typescript/v5/UnpublishContractParams) | { asyncParams: () => Promise<[UnpublishContractParams](https://portal.thirdweb.com/references/typescript/v5/UnpublishContractParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "unpublishContract" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UnpublishContractParams](https://portal.thirdweb.com/references/typescript/v5/UnpublishContractParams) | { asyncParams: () => Promise<[UnpublishContractParams](https://portal.thirdweb.com/references/typescript/v5/UnpublishContractParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## toBytes Converts a value to an array of bytes. ### Example `import { toBytes } from "thirdweb/utils"; const bytes = toBytes("0x1a4"); console.log(bytes); // Uint8Array(2) [ 1, 164 ] ` ##### Signature `function toBytes( value: string | number | bigint | boolean, opts: [ToBytesParameters](https://portal.thirdweb.com/references/typescript/v5/ToBytesParameters), ): Uint8Array; ` ### Parameters ##### value The value to convert. #### Type `let value: string | number | bigint | boolean; ` ##### opts Optional parameters for the conversion. #### Type `let opts: { size?: number }; ` ### Returns ##### Return Type `let returnType: Uint8Array; ` The array of bytes representing the value. ## toEther Converts a value from wei to ether. ### Example `import { toEther } from "thirdweb/utils"; toEther(1000000000000000000n); // '1' ` ##### Signature `function toEther(wei: bigint): string; ` ### Parameters ##### wei The value in wei to be converted. #### Type `let wei: bigint; ` ### Returns ##### Return Type `let returnType: string; ` The converted value in ether. ## toEventSelector Returns the hash (of the function/event signature) for a given event or function definition. ##### Signature `` function toEventSelector( fn: string | AbiEvent | AbiFunction, ): `0x${string}`; `` ### Parameters ##### fn #### Type `let fn: string | AbiEvent | AbiFunction; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` ## toFunctionSelector ##### Signature `` function toFunctionSelector(fn: string | AbiFunction): `0x${string}`; `` ### Parameters ##### fn #### Type `let fn: string | AbiFunction; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` ## toHex Converts a value to its hexadecimal representation. ### Example `import { toHex } from "thirdweb/utils"; const hex = toHex(420); console.log(hex); // "0x1a4" ` ##### Signature `` function toHex( value: | string | number | bigint | boolean | Uint8Array, opts: [ToHexParameters](https://portal.thirdweb.com/references/typescript/v5/ToHexParameters), ): `0x${string}`; `` ### Parameters ##### value The value to convert to hexadecimal. #### Type `let value: | string | number | bigint | boolean | Uint8Array; ` ##### opts Optional parameters for the conversion. #### Type `let opts: { size?: number }; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hexadecimal representation of the value. ## toSerializableTransaction Converts a prepared transaction to a transaction with populated options. ### Example `import { prepareTransaction, toSerializableTransaction, } from "thirdweb"; const transaction = await prepareTransaction({ transaction: { to: "0x...", value: 100, }, }); const finalTx = await toSerializableTransaction({ transaction, }); account.sendTransaction(finalTx); ` ##### Signature `` function toSerializableTransaction( options: [ToSerializableTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/ToSerializableTransactionOptions), ): Promise< | { accessList: undefined | AccessList; authorizationList: | undefined | Array<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; chainId: number; data: `0x${string}`; gas: bigint; gasPrice?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce: undefined | number; to: undefined | string; type: undefined | TransactionType; value: undefined | bigint; } | { accessList: undefined | AccessList; authorizationList: | undefined | Array<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; chainId: number; data: `0x${string}`; gas: bigint; gasPrice?: bigint; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: undefined | number; to: undefined | string; type: undefined | TransactionType; value: undefined | bigint; } >; `` ### Parameters ##### options The transaction and additional options for conversion #### Type `let options: { from?: string | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); transaction: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); }; ` ### Returns ##### Return Type `` let returnType: Promise< | { accessList: undefined | AccessList; authorizationList: | undefined | Array<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; chainId: number; data: `0x${string}`; gas: bigint; gasPrice?: undefined; maxFeePerGas?: bigint; maxPriorityFeePerGas?: bigint; nonce: undefined | number; to: undefined | string; type: undefined | TransactionType; value: undefined | bigint; } | { accessList: undefined | AccessList; authorizationList: | undefined | Array<{ address: string; chainId: number; nonce: bigint; r: bigint; s: bigint; yParity: number; }>; chainId: number; data: `0x${string}`; gas: bigint; gasPrice?: bigint; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: undefined | number; to: undefined | string; type: undefined | TransactionType; value: undefined | bigint; } >; `` A serializable transaction for inspection or submission to an account. For easier transaction sending, sendTransaction ## toTokens Converts a given number of units to a string representation with a specified number of decimal places. ### Example `import { toTokens } from "thirdweb/utils"; toTokens(1000000000000000000n, 18); // '1' ` ##### Signature `function toTokens(units: bigint, decimals: number): string; ` ### Parameters ##### units The number of units to convert. #### Type `let units: bigint; ` ##### decimals The number of decimal places to include in the string representation. #### Type `let decimals: number; ` ### Returns ##### Return Type `let returnType: string; ` The string representation of the converted units. ## toUnits Converts a string representation of a number with decimal places to a BigInt representation. ### Example `import { toUnits } from "thirdweb/utils"; toUnits("1", 18); // 1000000000000000000n ` ##### Signature `function toUnits(tokens: string, decimals: number): bigint; ` ### Parameters ##### tokens The string representation of the number, including the integer and fraction parts. #### Type `let tokens: string; ` ##### decimals The number of decimal places to include in the BigInt representation. #### Type `let decimals: number; ` ### Returns ##### Return Type `let returnType: bigint; ` The BigInt representation of the number. ## toWei Converts the specified number of tokens to Wei. ### Example `import { toWei } from "thirdweb/utils"; toWei("1"); // 1000000000000000000n ` ##### Signature `function toWei(tokens: string): bigint; ` ### Parameters ##### tokens The number of tokens to convert. #### Type `let tokens: string; ` ### Returns ##### Return Type `let returnType: bigint; ` The converted value in Wei. ## encodeInstall Encodes the install data for the TransferableERC1155 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## isTransferEnabled Calls the "isTransferEnabled" function on the contract. ### Example `import { TransferableERC1155 } from "thirdweb/modules"; const result = await TransferableERC1155.isTransferEnabled({ contract, }); ` ##### Signature `function isTransferEnabled( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the isTransferEnabled function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## install Installs the TransferableERC1155 module on a core contract. ### Example `import { TransferableERC1155 } from "thirdweb/modules"; const transaction = TransferableERC1155.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## module Convenience function to add the TransferableERC1155 module as a default module on a core contract. ### Example `import { TransferableERC1155, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC1155", params: { name: "My Modular Contract", }, modules: [TransferableERC1155.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## isTransferEnabledFor Calls the "isTransferEnabledFor" function on the contract. ### Example `import { TransferableERC1155 } from "thirdweb/modules"; const result = await TransferableERC1155.isTransferEnabledFor({ contract, target: ..., }); ` ##### Signature `function isTransferEnabledFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>, ): Promise; ` ### Parameters ##### options The options for the isTransferEnabledFor function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getMetadataUri Calls the "getMetadataUri" function on the contract. ### Example `import { getMetadataUri } from "thirdweb/extensions/thirdweb"; const result = await getMetadataUri({ contract, chainId: ..., deployment: ..., }); ` ##### Signature `function getMetadataUri( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetMetadataUriParams](https://portal.thirdweb.com/references/typescript/v5/GetMetadataUriParams)>, ): Promise; ` ### Parameters ##### options The options for the getMetadataUri function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetMetadataUriParams](https://portal.thirdweb.com/references/typescript/v5/GetMetadataUriParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setTransferable Prepares a transaction to call the "setTransferable" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC1155 } from "thirdweb/modules"; const transaction = TransferableERC1155.setTransferable({ contract, enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferable( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferable" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeInstall Encodes the install data for the TransferableERC20 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## setTransferableFor Prepares a transaction to call the "setTransferableFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC1155 } from "thirdweb/modules"; const transaction = TransferableERC1155.setTransferableFor({ contract, target: ..., enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferableFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferableFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## install Installs the TransferableERC20 module on a core contract. ### Example `import { TransferableERC20 } from "thirdweb/modules"; const transaction = TransferableERC20.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## isTransferEnabled Calls the "isTransferEnabled" function on the contract. ### Example `import { TransferableERC20 } from "thirdweb/modules"; const result = await TransferableERC20.isTransferEnabled({ contract, }); ` ##### Signature `function isTransferEnabled( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the isTransferEnabled function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isTransferEnabledFor Calls the "isTransferEnabledFor" function on the contract. ### Example `import { TransferableERC20 } from "thirdweb/modules"; const result = await TransferableERC20.isTransferEnabledFor({ contract, target: ..., }); ` ##### Signature `function isTransferEnabledFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>, ): Promise; ` ### Parameters ##### options The options for the isTransferEnabledFor function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## module Convenience function to add the TransferableERC20 module as a default module on a core contract. ### Example `import { TransferableERC20, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC20", params: { name: "My Modular Contract", }, modules: [TransferableERC20.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## setTransferable Prepares a transaction to call the "setTransferable" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC20 } from "thirdweb/modules"; const transaction = TransferableERC20.setTransferable({ contract, enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferable( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferable" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setTransferableFor Prepares a transaction to call the "setTransferableFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC20 } from "thirdweb/modules"; const transaction = TransferableERC20.setTransferableFor({ contract, target: ..., enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferableFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferableFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## encodeInstall Encodes the install data for the TransferableERC721 module. ##### Signature `function encodeInstall(): string; ` ### Returns ##### Return Type `let returnType: string; ` * The encoded data. ## install Installs the TransferableERC721 module on a core contract. ### Example `import { TransferableERC721 } from "thirdweb/modules"; const transaction = TransferableERC721.install({ contract: coreContract, account: account, }); await sendTransaction({ transaction, account, }); ` ##### Signature `function install(options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); contract: Readonly; params?: { publisher?: string }; }; ` ### Returns ##### Return Type `let returnType: Readonly & { __contract?: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract); __preparedMethod?: () => Promise>; }; ` the transaction to install the module ## isTransferEnabledFor Calls the "isTransferEnabledFor" function on the contract. ### Example `import { TransferableERC721 } from "thirdweb/modules"; const result = await TransferableERC721.isTransferEnabledFor({ contract, target: ..., }); ` ##### Signature `function isTransferEnabledFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>, ): Promise; ` ### Parameters ##### options The options for the isTransferEnabledFor function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[IsTransferEnabledForParams](https://portal.thirdweb.com/references/typescript/v5/IsTransferEnabledForParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## isTransferEnabled Calls the "isTransferEnabled" function on the contract. ### Example `import { TransferableERC721 } from "thirdweb/modules"; const result = await TransferableERC721.isTransferEnabled({ contract, }); ` ##### Signature `function isTransferEnabled( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the isTransferEnabled function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setTransferable Prepares a transaction to call the "setTransferable" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC721 } from "thirdweb/modules"; const transaction = TransferableERC721.setTransferable({ contract, enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferable( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferable" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | SetTransferableParams | { asyncParams: () => Promise } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setTransferableFor Prepares a transaction to call the "setTransferableFor" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { TransferableERC721 } from "thirdweb/modules"; const transaction = TransferableERC721.setTransferableFor({ contract, target: ..., enableTransfer: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setTransferableFor( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setTransferableFor" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams) | { asyncParams: () => Promise<[SetTransferableForParams](https://portal.thirdweb.com/references/typescript/v5/SetTransferableForParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## module Convenience function to add the TransferableERC721 module as a default module on a core contract. ### Example `import { TransferableERC721, deployModularContract, } from "thirdweb/modules"; const deployed = deployModularContract({ client, chain, account, core: "ERC721", params: { name: "My Modular Contract", }, modules: [TransferableERC721.module()], }); ` ##### Signature `` function module(params?: { publisher?: string; }): (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` ### Parameters ##### params optional The parameters for the module. #### Type `let params: { publisher?: string }; ` ### Returns ##### Return Type `` let returnType: (args: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }) => Promise<{ data: "0x"; module: `0x${string}` }>; `` * The module function. ## uint8ArrayToHex Converts an array of bytes to a hexadecimal string. ### Example `import { uint8arrayToHex } from "thirdweb/utils"; const hex = uint8arrayToHex( new Uint8Array([ 72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, ]), ); console.log(hex); // "0x48656c6c6f2c20776f726c64" ` ##### Signature `` function uint8ArrayToHex( value: Uint8Array, opts: Options, ): `0x${string}`; `` ### Parameters ##### value The array of bytes to convert. #### Type `let value: Uint8Array; ` ##### opts Optional parameters for the conversion. #### Type `let opts: Options; ` ### Returns ##### Return Type `` let returnType: `0x${string}`; `` The hexadecimal string representation of the bytes. ## createPool Prepares a transaction to call the "createPool" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { createPool } from "thirdweb/extensions/uniswap"; const transaction = createPool({ contract, tokenA: ..., tokenB: ..., fee: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function createPool( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CreatePoolParams](https://portal.thirdweb.com/references/typescript/v5/CreatePoolParams) | { asyncParams: () => Promise<[CreatePoolParams](https://portal.thirdweb.com/references/typescript/v5/CreatePoolParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "createPool" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [CreatePoolParams](https://portal.thirdweb.com/references/typescript/v5/CreatePoolParams) | { asyncParams: () => Promise<[CreatePoolParams](https://portal.thirdweb.com/references/typescript/v5/CreatePoolParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## exactInput Prepares a transaction to call the "exactInput" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { exactInput } from "thirdweb/extensions/uniswap"; const transaction = exactInput({ contract, params: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function exactInput( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactInputParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputParams) | { asyncParams: () => Promise<[ExactInputParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "exactInput" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ExactInputParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputParams) | { asyncParams: () => Promise<[ExactInputParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## enableFeeAmount Prepares a transaction to call the "enableFeeAmount" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { enableFeeAmount } from "thirdweb/extensions/uniswap"; const transaction = enableFeeAmount({ contract, fee: ..., tickSpacing: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function enableFeeAmount( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [EnableFeeAmountParams](https://portal.thirdweb.com/references/typescript/v5/EnableFeeAmountParams) | { asyncParams: () => Promise<[EnableFeeAmountParams](https://portal.thirdweb.com/references/typescript/v5/EnableFeeAmountParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "enableFeeAmount" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [EnableFeeAmountParams](https://portal.thirdweb.com/references/typescript/v5/EnableFeeAmountParams) | { asyncParams: () => Promise<[EnableFeeAmountParams](https://portal.thirdweb.com/references/typescript/v5/EnableFeeAmountParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## exactInputSingle Prepares a transaction to call the "exactInputSingle" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { exactInputSingle } from "thirdweb/extensions/uniswap"; const transaction = exactInputSingle({ contract, params: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function exactInputSingle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputSingleParams) | { asyncParams: () => Promise<[ExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputSingleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "exactInputSingle" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputSingleParams) | { asyncParams: () => Promise<[ExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactInputSingleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## exactOutput Prepares a transaction to call the "exactOutput" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { exactOutput } from "thirdweb/extensions/uniswap"; const transaction = exactOutput({ contract, params: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function exactOutput( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputParams) | { asyncParams: () => Promise<[ExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "exactOutput" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputParams) | { asyncParams: () => Promise<[ExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## exactOutputSingle Prepares a transaction to call the "exactOutputSingle" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { exactOutputSingle } from "thirdweb/extensions/uniswap"; const transaction = exactOutputSingle({ contract, params: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function exactOutputSingle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputSingleParams) | { asyncParams: () => Promise<[ExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputSingleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "exactOutputSingle" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [ExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputSingleParams) | { asyncParams: () => Promise<[ExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/ExactOutputSingleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## feeAmountEnabledEvent Creates an event object for the FeeAmountEnabled event. ### Example `import { getContractEvents } from "thirdweb"; import { feeAmountEnabledEvent } from "thirdweb/extensions/uniswap"; const events = await getContractEvents({ contract, events: [feeAmountEnabledEvent()], }); ` ##### Signature `function feeAmountEnabledEvent(): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "fee"; readonly type: "uint24" }, { readonly name: "tickSpacing"; readonly type: "int24" }, ]; readonly name: "FeeAmountEnabled"; readonly type: "event"; }>; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly name: "fee"; readonly type: "uint24" }, { readonly name: "tickSpacing"; readonly type: "int24" }, ]; readonly name: "FeeAmountEnabled"; readonly type: "event"; }>; ` The prepared event object. ## feeAmountTickSpacing Calls the "feeAmountTickSpacing" function on the contract. ### Example `import { feeAmountTickSpacing } from "thirdweb/extensions/uniswap"; const result = await feeAmountTickSpacing({ contract, fee: ..., }); ` ##### Signature `function feeAmountTickSpacing( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[FeeAmountTickSpacingParams](https://portal.thirdweb.com/references/typescript/v5/FeeAmountTickSpacingParams)>, ): Promise; ` ### Parameters ##### options The options for the feeAmountTickSpacing function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[FeeAmountTickSpacingParams](https://portal.thirdweb.com/references/typescript/v5/FeeAmountTickSpacingParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getPool Calls the "getPool" function on the contract. ### Example `import { getPool } from "thirdweb/extensions/uniswap"; const result = await getPool({ contract, tokenA: ..., tokenB: ..., fee: ..., }); ` ##### Signature `function getPool( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPoolParams](https://portal.thirdweb.com/references/typescript/v5/GetPoolParams)>, ): Promise; ` ### Parameters ##### options The options for the getPool function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetPoolParams](https://portal.thirdweb.com/references/typescript/v5/GetPoolParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getUniswapV3Pool Finds the Uniswap V3 pools for the two tokens. ### Example `import { getUniswapV3Pool } from "thirdweb/extensions/uniswap"; const pools = await getUniswapV3Pool({ tokenA: "0x...", tokenB: "0x...", contract: factoryContract, }); ` ##### Signature `function getUniswapV3Pool( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetUniswapV3PoolParams](https://portal.thirdweb.com/references/typescript/v5/GetUniswapV3PoolParams)>, ): Promise>; ` ### Parameters ##### options The token pair to find any pools for any Uniswap contract that implements getPool. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetUniswapV3PoolParams](https://portal.thirdweb.com/references/typescript/v5/GetUniswapV3PoolParams)>; ` ### Returns ##### Return Type `let returnType: { poolAddress: Address; poolFee: (typeof UniswapFee)[keyof typeof UniswapFee]; }; ` The pools' addresses and fees. ## owner Calls the "owner" function on the contract. ### Example `import { owner } from "thirdweb/extensions/uniswap"; const result = await owner({ contract, }); ` ##### Signature `function owner(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the owner function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## ownerChangedEvent Creates an event object for the OwnerChanged event. ### Example `import { getContractEvents } from "thirdweb"; import { ownerChangedEvent } from "thirdweb/extensions/uniswap"; const events = await getContractEvents({ contract, events: [ ownerChangedEvent({ oldOwner: ..., newOwner: ..., }) ], }); ` ##### Signature `function ownerChangedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "oldOwner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "newOwner"; readonly type: "address"; }, ]; readonly name: "OwnerChanged"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "oldOwner"; readonly type: "address"; }, { readonly indexed: true; readonly name: "newOwner"; readonly type: "address"; }, ]; readonly name: "OwnerChanged"; readonly type: "event"; }>; ` The prepared event object. ## quoteExactInput Prepares a transaction to call the "quoteExactInput" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { quoteExactInput } from "thirdweb/extensions/uniswap"; const transaction = quoteExactInput({ contract, path: ..., amountIn: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function quoteExactInput( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactInputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputParams) | { asyncParams: () => Promise<[QuoteExactInputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "quoteExactInput" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactInputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputParams) | { asyncParams: () => Promise<[QuoteExactInputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## poolCreatedEvent Creates an event object for the PoolCreated event. ### Example `import { getContractEvents } from "thirdweb"; import { poolCreatedEvent } from "thirdweb/extensions/uniswap"; const events = await getContractEvents({ contract, events: [ poolCreatedEvent({ token0: ..., token1: ..., sender: ..., }) ], }); ` ##### Signature `function poolCreatedEvent( filters: Partial, ): [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "token0"; readonly type: "address"; }, { readonly indexed: true; readonly name: "token1"; readonly type: "address"; }, { readonly name: "fee"; readonly type: "uint24" }, { readonly name: "tickLower"; readonly type: "int24" }, { readonly name: "tickUpper"; readonly type: "int24" }, { readonly name: "liquidity"; readonly type: "uint128" }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "PoolCreated"; readonly type: "event"; }>; ` ### Parameters ##### filters Optional filters to apply to the event. #### Type `let filters: Partial; ` ### Returns ##### Return Type `let returnType: [PreparedEvent](https://portal.thirdweb.com/references/typescript/v5/PreparedEvent)<{ readonly inputs: readonly [ { readonly indexed: true; readonly name: "token0"; readonly type: "address"; }, { readonly indexed: true; readonly name: "token1"; readonly type: "address"; }, { readonly name: "fee"; readonly type: "uint24" }, { readonly name: "tickLower"; readonly type: "int24" }, { readonly name: "tickUpper"; readonly type: "int24" }, { readonly name: "liquidity"; readonly type: "uint128" }, { readonly indexed: true; readonly name: "sender"; readonly type: "address"; }, ]; readonly name: "PoolCreated"; readonly type: "event"; }>; ` The prepared event object. ## quoteExactOutput Prepares a transaction to call the "quoteExactOutput" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { quoteExactOutput } from "thirdweb/extensions/uniswap"; const transaction = quoteExactOutput({ contract, path: ..., amountOut: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function quoteExactOutput( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputParams) | { asyncParams: () => Promise<[QuoteExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "quoteExactOutput" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputParams) | { asyncParams: () => Promise<[QuoteExactOutputParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## quoteExactInputSingle Prepares a transaction to call the "quoteExactInputSingle" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { quoteExactInputSingle } from "thirdweb/extensions/uniswap"; const transaction = quoteExactInputSingle({ contract, tokenIn: ..., tokenOut: ..., fee: ..., amountIn: ..., sqrtPriceLimitX96: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function quoteExactInputSingle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputSingleParams) | { asyncParams: () => Promise<[QuoteExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputSingleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "quoteExactInputSingle" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputSingleParams) | { asyncParams: () => Promise<[QuoteExactInputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactInputSingleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## quoteExactOutputSingle Prepares a transaction to call the "quoteExactOutputSingle" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { quoteExactOutputSingle } from "thirdweb/extensions/uniswap"; const transaction = quoteExactOutputSingle({ contract, tokenIn: ..., tokenOut: ..., fee: ..., amountOut: ..., sqrtPriceLimitX96: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function quoteExactOutputSingle( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputSingleParams) | { asyncParams: () => Promise<[QuoteExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputSingleParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "quoteExactOutputSingle" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [QuoteExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputSingleParams) | { asyncParams: () => Promise<[QuoteExactOutputSingleParams](https://portal.thirdweb.com/references/typescript/v5/QuoteExactOutputSingleParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setOwner Prepares a transaction to call the "setOwner" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setOwner } from "thirdweb/extensions/uniswap"; const transaction = setOwner({ contract, newOwner: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setOwner( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams) | { asyncParams: () => Promise<[SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setOwner" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams) | { asyncParams: () => Promise<[SetOwnerParams](https://portal.thirdweb.com/references/typescript/v5/SetOwnerParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## unpin Unpins a file from IPFS. For security purposes, this method requires a secret key to be set in the ThirdwebClient instance. ### Example `import { unpin } from "thirdweb"; const result = await unpin({ client: thirdwebClient, cid: "QmTzQ1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1", }); ` ##### Signature `function unpin(options: [UnpinOptions](https://portal.thirdweb.com/references/typescript/v5/UnpinOptions)): Promise; ` ### Parameters ##### options The options for unpinning the file. #### Type `let options: { cid: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## unlinkProfile Disconnects an existing profile (authentication method) from the current user. Once disconnected, that profile can no longer be used to sign into the account. ### Example `import { inAppWallet } from "thirdweb/wallets"; const wallet = inAppWallet(); wallet.connect({ strategy: "google" }); const profiles = await getProfiles({ client, }); const updatedProfiles = await unlinkProfile({ client, profileToUnlink: profiles[0], }); ` ##### Signature `function unlinkProfile(args: UnlinkParams): Promise>; ` ### Parameters ##### args The object containing the profile that we want to unlink. #### Type `let args: UnlinkParams; ` ### Returns ##### Return Type `let returnType: { details: { address?: [Address](https://portal.thirdweb.com/references/typescript/v5/Address); email?: string; id?: string; phone?: string; }; type: AuthOption; }; ` A promise that resolves to the updated linked profiles. ## namehash Calls the "namehash" function on the contract. ### Example `import { namehash } from "thirdweb/extensions/unstoppable-domains"; const result = await namehash({ contract, labels: ..., }); ` ##### Signature `function namehash( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NamehashParams](https://portal.thirdweb.com/references/typescript/v5/NamehashParams)>, ): Promise; ` ### Parameters ##### options The options for the namehash function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[NamehashParams](https://portal.thirdweb.com/references/typescript/v5/NamehashParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## resolveAddress Resolve an Unstoppable-Domain domain to an Ethereum address ### Example #### Basic usage `import { resolveAddress } from "thirdweb/extension/unstoppable-domains"; const address = await resolveAddress({ client, name: "thirdweb.crypto", }); ` #### Custom resolver By default this extension will try to resolve the name on Polygon mainnet, you can decide to customize the resolver contract by specifying `resolverAddress` and `resolverChain` `import { ethereum } from "thirdweb/chains"; const address = await resolveAddress({ client, name: "thirdweb.crypto", resolverAddress: "0x...", resolverChain: ethereum, }); ` ##### Signature `function resolveAddress( options: [ResolveAddressOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveAddressOptions), ): Promise; ` ### Parameters ##### options The options for resolving an UD domain #### Type `let options: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); name: string; resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` The Ethereum address associated with the domain name. [ Learn more](https://docs.unstoppabledomains.com/reverse-resolution/) ## resolveName Resolves the primary Untoppable-Domains name for a specified address. ### Example #### Basic usage `import { resolveName } from "thirdweb/extension/unstoppable-domains"; const name = await resolveName({ client, address: "0x...", }); ` #### Custom resolver By default this extension will try to resolve the address on Polygon mainnet, you can decide to customize the resolver contract by specifying `resolverAddress` and `resolverChain` `import { ethereum } from "thirdweb/chains"; const address = await resolveName({ client, address: "0x...", resolverAddress: "0x...", resolverChain: ethereum, }); ` ##### Signature `function resolveName(options: [ResolveUDNameOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveUDNameOptions)): Promise; ` ### Parameters ##### options The options for resolving an UD domain #### Type `let options: { address: string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); resolverAddress?: string; resolverChain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); }; ` ### Returns ##### Return Type `let returnType: Promise; ` ## reverseNameOf Calls the "reverseNameOf" function on the contract. ### Example `import { reverseNameOf } from "thirdweb/extensions/unstoppable-domains"; const result = await reverseNameOf({ contract, addr: ..., }); ` ##### Signature `function reverseNameOf( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReverseNameOfParams](https://portal.thirdweb.com/references/typescript/v5/ReverseNameOfParams)>, ): Promise; ` ### Parameters ##### options The options for the reverseNameOf function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ReverseNameOfParams](https://portal.thirdweb.com/references/typescript/v5/ReverseNameOfParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## uploadMobile Batch upload arbitrary file or JSON data using the configured decentralized storage system. Automatically uploads any file data within JSON objects and replaces them with hashes. ### Example `// Upload an image launchImageLibrary({ mediaType: "photo" }, async (response) => { if (response.assets?.[0]) { const { fileName, type, uri } = response.assets[0]; if (!uri) { throw new Error("No uri"); } const resp = await uploadMobile({ uri, type, name: fileName, }); } }); // Upload an array of JSON objects const objects = [ { name: "JSON 1", text: "Hello World" }, { name: "JSON 2", trait: "Awesome" }, ]; const jsonUris = await uploadMobile(objects); ` ##### Signature `function uploadMobile( options: [UploadMobileOptions](https://portal.thirdweb.com/references/typescript/v5/UploadMobileOptions), ): Promise>; ` ### Parameters ##### options Options to pass through to the storage uploader class #### Type `let options: InternalUploadMobileOptions & { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: Promise>; ` The URIs of the uploaded data ## upload Uploads files based on the provided options. ### Example #### Uploading JSON objects `import { upload } from "thirdweb/storage"; const uri = await upload({ client, files: [ { name: "something", data: { hello: "world", }, }, ], }); ` #### Uploading files `import { upload } from "thirdweb/storage"; const uri = await upload({ client, files: [new File(["hello world"], "hello.txt")], }); ` ##### Signature `function upload( options: [UploadOptions](https://portal.thirdweb.com/references/typescript/v5/UploadOptions), ): Promise>; ` ### Parameters ##### options The upload options. #### Type `let options: [UploadOptions](https://portal.thirdweb.com/references/typescript/v5/UploadOptions); ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to the uploaded file URI or URIs (when passing multiple files). ## useActiveAccount A hook that returns the active account ### Example `import { useActiveAccount } from "thirdweb/react"; const activeAccount = useActiveAccount(); console.log("address", activeAccount?.address); ` ##### Signature `function useActiveAccount(): undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` ### Returns ##### Return Type `let returnType: undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); ` The active `Account` or `undefined` if no active account is set. ## useActiveWallet A hook that returns the active wallet ### Example #### Basic usage `import { useActiveWallet } from "thirdweb/react"; const wallet = useActiveWallet(); ` #### Listen to account change event `const wallet = useActiveWallet(); wallet?.subscribe("accountChanged", (account) => { console.log(account); }); ` #### Listen to multiple accounts changed event `const wallet = useActiveWallet(); wallet?.subscribe("accountsChanged", (addresses) => { console.log(addresses); }); ` #### Listen to network change event `const wallet = useActiveWallet(); wallet?.subscribe("chainChanged", (chain) => { console.log(chain); }); ` ##### Signature `function useActiveWallet(): undefined | [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ### Returns ##### Return Type `let returnType: undefined | [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` The active `Wallet` or `undefined` if no active wallet is set. ## useActiveWalletChain A hook that returns the chain the active wallet is connected to ### Example `import { useActiveWalletChain } from "thirdweb/react"; const activeChain = useActiveWalletChain(); ` ##### Signature `function useActiveWalletChain(): | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ### Returns ##### Return Type `let returnType: undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` The chain the active wallet is connected to or null if no active wallet. ## useActiveWalletConnectionStatus A hook that returns the active account's connection status. ### Example `import { useActiveWalletConnectionStatus } from "thirdweb/react"; function Example() { const status = useActiveWalletConnectionStatus(); console.log(status); return
...
; } ` ##### Signature `function useActiveWalletConnectionStatus(): [ConnectionStatus](https://portal.thirdweb.com/references/typescript/v5/ConnectionStatus); ` ### Returns ##### Return Type `let returnType: | "connected" | "disconnected" | "connecting" | "unknown"; ` The active wallet's connection status. ## useAutoConnect Autoconnect the last previously connected wallet. ### Example `import { useAutoConnect } from "thirdweb/react"; const { data: autoConnected, isLoading } = useAutoConnect({ client, accountAbstraction, wallets, onConnect, timeout, }); ` ##### Signature `function useAutoConnect( props: [AutoConnectProps](https://portal.thirdweb.com/references/typescript/v5/AutoConnectProps), ): UseQueryResult; ` ### Parameters ##### props The props for auto connect. #### Type `let props: { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; onTimeout?: () => void; timeout?: number; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ### Returns ##### Return Type `let returnType: UseQueryResult; ` whether the auto connect was successful. ## useAdminWallet Get the admin wallet for the active wallet Useful for smart wallets to get the underlying personal account ##### Signature `function useAdminWallet(): undefined | [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` ### Returns ##### Return Type `let returnType: undefined | [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); ` The admin wallet for the active wallet, or the active wallet if it doesn't have an admin account ## useBlockNumber Hook that watches for changes in the block number on a given chain. ### Example `import { useBlockNumber } from "thirdweb/react"; const blockNumber = useBlockNumber({ client, chain }); ` ##### Signature `function useBlockNumber( options: [UseBlockNumberOptions](https://portal.thirdweb.com/references/typescript/v5/UseBlockNumberOptions), ): undefined | bigint; ` ### Parameters ##### options The options for the hook. #### Type `let options: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); enabled?: boolean; watch?: boolean; }; ` ### Returns ##### Return Type `let returnType: undefined | bigint; ` The latest block number. ## useBuyHistory Hook to get the history of Buy transactions for a given wallet - This includes both "buy with crypto" and "buy with fiat" transactions. This hook is a React Query wrapper of the [getBuyHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyHistory) function. You can also use that function directly ### Example `import { useBuyHistory } from "thirdweb/react"; function Component() { const buyHistoryQuery = useBuyHistory(params); return
...
; } ` ##### Signature `function useBuyHistory( params?: [BuyHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryParams), queryParams?: BuyHistoryQueryOptions, ): UseQueryResult<[BuyHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryData)>; ` ### Parameters ##### params optional object of type [BuyHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### queryParams optional options to configure the react query #### Type `let queryParams: BuyHistoryQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryData)>; ` A React Query object which contains the data of type [BuyHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyHistoryData) ## useBuyWithCryptoQuote Hook to get a price quote for performing a "Buy with crypto" transaction that allows users to buy a token with another token - aka a swap. The price quote is an object of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) . This quote contains the information about the purchase such as token amounts, processing fees, estimated time etc. This hook is a React Query wrapper of the [getBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoQuote) function. You can also use that function directly Once you have the quote, you can use the [useSendTransaction](https://portal.thirdweb.com/references/typescript/v5/useSendTransaction) function to send the purchase and [useBuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/useBuyWithCryptoStatus) function to get the status of the swap transaction. ### Example `import { useBuyWithCryptoQuote, useBuyWithCryptoStatus, type BuyWithCryptoStatusQueryParams, useActiveAccount, } from "thirdweb/react"; import { sendTransaction } from "thirdweb"; function Component() { const buyWithCryptoQuoteQuery = useBuyWithCryptoQuote(swapParams); const [buyTxHash, setBuyTxHash] = useState< BuyWithCryptoStatusQueryParams | undefined >(); const buyWithCryptoStatusQuery = useBuyWithCryptoStatus( buyTxHash ? { client, transactionHash: buyTxHash, } : undefined, ); async function handleBuyWithCrypto() { const account = useActiveAccount(); // if approval is required if (buyWithCryptoQuoteQuery.data.approval) { const approveTx = await sendTransaction({ transaction: swapQuote.data.approval, account: account, }); await waitForApproval(approveTx); } // send the transaction to buy crypto // this promise is resolved when user confirms the transaction in the wallet and the transaction is sent to the blockchain const buyTx = await sendTransaction({ transaction: swapQuote.data.transactionRequest, account: account, }); await waitForApproval(buyTx); // set buyTx.transactionHash to poll the status of the swap transaction setBuyWithCryptoTx(buyTx.transactionHash); } return ; } ` ##### Signature `function useBuyWithCryptoQuote( params?: [GetBuyWithCryptoQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithCryptoQuoteParams), queryParams?: BuyWithCryptoQuoteQueryOptions, ): UseQueryResult<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` ### Parameters ##### params optional object of type [BuyWithCryptoQuoteQueryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuoteQueryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromChainId: number; fromTokenAddress: string; intentId?: string; maxSlippageBPS?: number; purchaseData?: object; toAddress: string; toChainId: number; toTokenAddress: string; } & ( | { fromAmount: string; toAmount?: never } | { fromAmount?: never; toAmount: string } ); ` ##### queryParams optional options to configure the react query #### Type `let queryParams: BuyWithCryptoQuoteQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` A React Query object which contains the data of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) ## useBuyWithCryptoHistory Hook to get the "Buy with crypto" transaction history for a given wallet address. This hook is a React Query wrapper of the [getBuyWithCryptoHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoHistory) function. You can also use that function directly ### Example `import { useBuyWithCryptoHistory } from "thirdweb/react"; function Component() { const buyWithCryptoHistory = useBuyWithCryptoHistory(params); return
...
; } ` ##### Signature `function useBuyWithCryptoHistory( params?: [BuyWithCryptoHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryParams), queryParams?: BuyWithCryptoHistoryQueryOptions, ): UseQueryResult<[BuyWithCryptoHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData)>; ` ### Parameters ##### params optional object of type [BuyWithCryptoHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### queryParams optional options to configure the react query #### Type `let queryParams: BuyWithCryptoHistoryQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithCryptoHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData)>; ` A React Query object which contains the data of type [BuyWithCryptoHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoHistoryData) ## useBuyWithCryptoStatus A hook to get a status of a "Buy with crypto" transaction to determine if the transaction is completed, failed or pending. This hook is a React Query wrapper of the [getBuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoStatus) function. You can also use that function directly. ### Example `import { useSendTransaction, useBuyWithCryptoQuote, useBuyWithCryptoStatus, type BuyWithCryptoStatusQueryParams, useActiveAccount, } from "thirdweb/react"; import { sendTransaction } from "thirdweb"; function Component() { const buyWithCryptoQuoteQuery = useBuyWithCryptoQuote(swapParams); const [buyTxHash, setBuyTxHash] = useState< BuyWithCryptoStatusQueryParams | undefined >(); const buyWithCryptoStatusQuery = useBuyWithCryptoStatus( buyTxHash ? { client, transactionHash: buyTxHash, } : undefined, ); const account = useActiveAccount(); async function handleBuyWithCrypto() { // if approval is required if (buyWithCryptoQuoteQuery.data.approval) { const approveTx = await sendTransaction({ account: account, transaction: swapQuote.data.approval, }); await waitForApproval(approveTx); } // send the transaction to buy crypto // this promise is resolved when user confirms the transaction in the wallet and the transaction is sent to the blockchain const buyTx = await sendTransactionMutation.mutateAsync({ transaction: swapQuote.data.transactionRequest, account: account, }); await waitForApproval(buyTx); // set buyTx.transactionHash to poll the status of the swap transaction setBuyWithCryptoTx(buyTx.transactionHash); } return ; } ` ##### Signature `function useBuyWithCryptoStatus( params?: [BuyWithCryptoTransaction](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransaction), ): UseQueryResult<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus), Error>; ` ### Parameters ##### params optional object of type [BuyWithCryptoTransaction](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransaction) #### Type `let params: { chainId: number; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); transactionHash: string; }; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus), Error>; ` A react query object which contains the data of type [BuyWithCryptoStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) ## useBuyWithFiatHistory Hook to get the "Buy with Fiat" transaction history for a given wallet address. This hook is a React Query wrapper of the [getBuyWithFiatHistory](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatHistory) function. You can also use that function directly ### Example `import { useBuyWithFiatHistory } from "thirdweb/react"; function Component() { const historyQuery = useBuyWithFiatHistory(params); return
...
; } ` ##### Signature `function useBuyWithFiatHistory( params?: [BuyWithFiatHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryParams), queryParams?: BuyWithFiatHistoryQueryOptions, ): UseQueryResult<[BuyWithFiatHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData)>; ` ### Parameters ##### params optional object of type [BuyWithFiatHistoryParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); count: number; start: number; walletAddress: string; }; ` ##### queryParams optional options to configure the react query #### Type `let queryParams: BuyWithFiatHistoryQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithFiatHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData)>; ` A React Query object which contains the data of type [BuyWithFiatHistoryData](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatHistoryData) ## useBuyWithFiatQuote Hook to get a price quote for performing a "Buy with Fiat" transaction that allows users to buy a token with fiat currency. The price quote is an object of type [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) . This quote contains the information about the purchase such as token amounts, processing fees, estimated time etc. This hook is a React Query wrapper of the [getBuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/getBuyWithFiatQuote) function. You can also use that function directly Once you have the `quote` , you can open a new window with `quote.onRampLink` to allow the user to buy the token with fiat currency. and [useBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/useBuyWithFiatStatus) function to start polling for the status of this transaction. ### Example `import { NATIVE_TOKEN_ADDRESS } from "thirdweb"; import { base } from "thirdweb/chains"; import { useBuyWithFiatQuote } from "thirdweb/react"; // get a quote for buying 0.01 base native token with USD fiat currency function Example() { const quote = useBuyWithFiatQuote({ client: client, // thirdweb client fromCurrencySymbol: "USD", // fiat currency symbol toChainId: base.id, // base chain id toAmount: "0.01", // amount of token to buy toTokenAddress: NATIVE_TOKEN_ADDRESS, // native token toAddress: "0x...", // user's wallet address }); return (
{quote.data && ( open onramp provider )}
); } ` ##### Signature `function useBuyWithFiatQuote( params?: [GetBuyWithFiatQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatQuoteParams), queryOptions?: BuyWithFiatQuoteQueryOptions, ): UseQueryResult<[BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote)>; ` ### Parameters ##### params optional object of type [GetBuyWithFiatQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatQuoteParams) #### Type `let params: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); fromAddress: string; fromAmount?: string; fromCurrencySymbol: CurrencyMeta["shorthand"]; isTestMode?: boolean; maxSlippageBPS?: number; preferredProvider?: FiatProvider; purchaseData?: object; toAddress: string; toAmount?: string; toChainId: number; toGasAmountWei?: string; toTokenAddress: string; }; ` ##### queryOptions optional #### Type `let queryOptions: BuyWithFiatQuoteQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote)>; ` A React Query object which contains the data of type [BuyWithFiatQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatQuote) ## useBuyWithFiatStatus A hook to get a status of a "Buy with Fiat" transaction to determine if the transaction is completed, failed or pending. This hook is a React Query wrapper of the [getBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/getBuyWithCryptoStatus) function. You can also use that function directly. `useBuyWithFiatStatus` refetches the status using `getBuyWithFiatStatus` every 5 seconds. ### Example `import { useBuyWithFiatStatus } from "thirdweb/react"; import { client } from "./client"; function Example() { const fiatStatus = useBuyWithFiatStatus({ client: client, // thirdweb client intentId: "....", // get the intentId from quote ( quote.intentId ) }); console.log(fiatStatus.data); return
...
; } ` ##### Signature `function useBuyWithFiatStatus( params?: WithPickedOnceQueryOptions<[GetBuyWithFiatStatusParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatStatusParams)>, ): UseQueryResult<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; ` ### Parameters ##### params optional object of type [GetBuyWithFiatStatusParams](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoTransaction) #### Type `let params: WithPickedOnceQueryOptions<[GetBuyWithFiatStatusParams](https://portal.thirdweb.com/references/typescript/v5/GetBuyWithFiatStatusParams)>; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus)>; ` A react query object which contains the data of type [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoStatus) ## useChainMetadata Retrieves metadata for a chain such as name, icon, available faucets, block explorers, etc. ### Example `import { useChainMetadata } from "thirdweb/react"; const { data: chainMetadata } = useChainMetadata(defineChain(11155111)); console.log("Name:", chainMetadata.name); // Sepolia console.log("Faucets:", chainMetadata.faucets); // ["https://thirdweb.com/sepolia/faucet"] console.log("Explorers:", chainMetadata.explorers); // ["https://sepolia.etherscan.io/"] ` ##### Signature `function useChainMetadata( chain?: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>, ): UseQueryResult<[ChainMetadata](https://portal.thirdweb.com/references/typescript/v5/ChainMetadata)>; ` ### Parameters ##### chain optional Chain to retrieve metadata for, see [ defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) for how to create a chain from a chain ID. #### Type `let chain: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[ChainMetadata](https://portal.thirdweb.com/references/typescript/v5/ChainMetadata)>; ` A React Query result containing the chain metadata ## useConnectModal hook that allows you to open the Connect UI in a Modal to prompt the user to connect wallet. ### Example `import { createThirdwebClient } from "thirdweb"; import { useConnectModal } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "", }); function Example() { const { connect, isConnecting } = useConnectModal(); async function handleConnect() { const wallet = await connect({ client }); // opens the connect modal console.log("connected to", wallet); } return ; } ` The returned `connect` method takes an object of type [ UseConnectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps)as an argument to customize the Connect Modal UI. Refer to [ UseConnectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButtonProps) to see the available options. ##### Signature `function useConnectModal(): { connect: (props: [UseConnectModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseConnectModalOptions)) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; isConnecting: boolean; }; ` ### Returns ##### Return Type `let returnType: { connect: (props: [UseConnectModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseConnectModalOptions)) => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; isConnecting: boolean; }; ` ## useConnect A hook to set a wallet as active wallet ### Example `import { createThirdwebClient } from "thirdweb"; import { useConnect } from "thirdweb/react"; import { createWallet } from "thirdweb/wallets"; const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID", }); function Example() { const { connect, isConnecting, error } = useConnect(); return ( ); } ` ##### Signature `function useConnect(options?: [ConnectManagerOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectManagerOptions)): { readonly connect: ( walletOrFn: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) | (() => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>), ) => Promise; error: null | Error; isConnecting: boolean; }; ` ### Parameters ##### options optional #### Type `let options: { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; setWalletAsActive?: boolean; }; ` ### Returns ##### Return Type `let returnType: { readonly connect: ( walletOrFn: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) | (() => Promise<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>), ) => Promise; error: null | Error; isConnecting: boolean; }; ` A function that lets you connect a wallet. ## useConnectedWallets A hook that returns all connected wallets ### Example `import { useConnectedWallets } from "thirdweb/react"; const wallets = useConnectedWallets(); ` ##### Signature `function useConnectedWallets(): Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ### Returns ##### Return Type `let returnType: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` An array of all connected wallets ## useContractEvents Watches contract events and returns the parsed logs. ### Example #### Using event extensions The `thirdweb/extesions` export contains event definitions for many popular contracts. You can use these event definitions to watch for specific events with a type-safe API. `import { useContractEvents } from "thirdweb/react"; import { tokensClaimedEvent } from "thirdweb/extensions/erc721"; const account = useActiveAccount(); const contractEvents = useContractEvents({ contract, events: [tokensClaimedEvent({ claimer: account?.address })], }); ` #### Using custom events You can also watch for custom events by passing an array of [ prepared events](https://portal.thirdweb.com/references/typescript/v5/prepareEvent) . `import { useContractEvents } from "thirdweb/react"; import { prepareEvent } from "thirdweb"; const myEvent = prepareEvent({ signature: "event MyEvent(uint256 myArg)", }); const contractEvents = useContractEvents({ contract, events: [myEvent], }); ` ##### Signature `function useContractEvents( options: UseContractEventsOptions, ): UseQueryResult<[ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult), Error>; ` ### Parameters ##### options The options for watching contract events. #### Type `let options: UseContractEventsOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult< [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult), Error >; ` The contract events of the watched contract events. ## useDisconnect Disconnect from given account ### Example `import { useDisconnect, useActiveWallet } from "thirdweb/react"; function Example() { const { disconnect } = useDisconnect(); const wallet = useActiveWallet(); return ( ); } ` ##### Signature `function useDisconnect(): { disconnect: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void }; ` ### Returns ##### Return Type `let returnType: { disconnect: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void }; ` An object with a function to disconnect an account ## useEstimateGas A hook to estimate the gas for a given transaction. ### Example `import { useEstimateGas } from "thirdweb/react"; const { mutate: estimateGas, data: gasEstimate } = useEstimateGas(); // later const estimatedGas = await estimateGas(tx); ` ##### Signature `function useEstimateGas(): UseMutationResult< bigint, Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; ` ### Returns ##### Return Type `let returnType: UseMutationResult; ` A mutation object to estimate gas. ## useEstimateGasCost A hook to estimate the gas cost in ether and wei for a given transaction. ### Example `import { useEstimateGasCost } from "thirdweb/react"; const { mutate: estimateGasCost, data: gasEstimate } = useEstimateGas(); // later const estimatedGas = await estimateGasCost(tx); console.log("gas cost in ether", estimatedGas.ether); ` ##### Signature `function useEstimateGasCost(): UseMutationResult< [EstimateGasCostResult](https://portal.thirdweb.com/references/typescript/v5/EstimateGasCostResult), Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; ` ### Returns ##### Return Type `let returnType: UseMutationResult< [EstimateGasCostResult](https://portal.thirdweb.com/references/typescript/v5/EstimateGasCostResult), Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; ` A mutation object to estimate gas cost. ## useLinkProfile Links a web2 or web3 profile to the connected in-app or ecosystem account. _When a profile is linked to the account, that profile can then be used to sign into the same account._ ### Example #### Linking a social profile `import { useLinkProfile } from "thirdweb/react"; const { mutate: linkProfile } = useLinkProfile(); const onClick = () => { linkProfile({ client, strategy: "discord", // or "google", "x", "telegram", etc }); }; ` #### Linking an email `import { useLinkProfile } from "thirdweb/react"; import { preAuthenticate } from "thirdweb/wallets"; const { mutate: linkProfile } = useLinkProfile(); // send a verification email first const sendEmail = async () => { const email = await preAuthenticate({ client, strategy: "email", email: "john.doe@example.com", }); }; // then link the profile with the verification code const onClick = (code: string) => { linkProfile({ client, strategy: "email", email: "john.doe@example.com", verificationCode: code, }); }; ` The same process can be used for phone and email, simply swap out the `strategy` parameter. #### Linking a wallet `import { useLinkProfile } from "thirdweb/react"; const { mutate: linkProfile } = useLinkProfile(); const onClick = () => { linkProfile({ client, strategy: "wallet", wallet: createWallet("io.metamask"), // autocompletion for 400+ wallet ids chain: sepolia, // any chain works, needed for SIWE signature }); }; ` ##### Signature `function useLinkProfile(): UseMutationResult< Array<[Profile](https://portal.thirdweb.com/references/typescript/v5/Profile)>, Error, AuthArgsType, unknown >; ` ### Returns ##### Return Type `let returnType: UseMutationResult< Array<[Profile](https://portal.thirdweb.com/references/typescript/v5/Profile)>, Error, AuthArgsType, unknown >; ` ## useIsAutoConnecting A hook to check if the auto connect is in progress. ### Example `function Example() { const isAutoConnecting = useIsAutoConnecting(); return
...
; } ` ##### Signature `function useIsAutoConnecting(): boolean; ` ### Returns ##### Return Type `let returnType: boolean; ` A boolean indicating if the auto connect is in progress. ## useNetworkSwitcherModal Hook to open the Wallet Network Switcher Modal that shows allows users to switch to different network. ### Example `import { createThirdwebClient } from "thirdweb"; import { useNetworkSwitcherModal } from "thirdweb/react"; import { base, ethereum, polygon, sepolia, arbitrum } from "thirdweb/chains"; const client = createThirdwebClient({ clientId: "", }); function Example() { const networkSwitcher = useNetworkSwitcherModal(); function handleClick() { networkSwitcher.open({ client, theme: 'light' sections: [ { label: 'Recently used', chains: [arbitrum, polygon] }, { label: 'Popular', chains: [base, ethereum, sepolia] }, ] }); } return } ` ##### Signature `function useNetworkSwitcherModal(): { close: () => void; open: (props: [UseNetworkSwitcherModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseNetworkSwitcherModalOptions)) => Promise; }; ` ### Returns ##### Return Type `let returnType: { close: () => void; open: (props: [UseNetworkSwitcherModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseNetworkSwitcherModalOptions)) => Promise; }; ` ## useProfiles Retrieves all linked profiles of the connected in-app or ecosystem account. ### Example `import { useProfiles } from "thirdweb/react"; const { data: profiles } = useProfiles({ client, }); console.log("Type:", profiles[0].type); // "discord" console.log("Email:", profiles[0].details.email); // "john.doe@example.com" ` ##### Signature `function useProfiles(args: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }): UseQueryResult>; ` ### Parameters ##### args #### Type `let args: { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: UseQueryResult>; ` A React Query result containing the linked profiles for the connected in-app account. This hook will only run if the connected wallet supports account linking. ## usePostOnRampQuote When buying a token with fiat currency - It only involes doing on-ramp if the on-ramp provider supports buying the given destination token directly. If the on-ramp provider does not support buying the destination token directly, user can be sent an intermediate token with fiat currency from the on-ramp provider which can be swapped to destination token onchain. `usePostOnRampQuote` hook is used to get the quote for swapping the on-ramp token to destination token. When you get a "Buy with Fiat" status of type `"CRYPTO_SWAP_REQUIRED"` from the [useBuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/useBuyWithFiatStatus) hook, you can use `usePostOnRampQuote` hook to get the quote of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) for swapping the on-ramp token to destination token to complete the step-2 of the process. Once you have the quote, you can start the Swap process by following the same steps as mentioned in the [useBuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/useBuyWithCryptoQuote) documentation. ##### Signature `function usePostOnRampQuote( params?: [GetPostOnRampQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetPostOnRampQuoteParams), queryOptions?: PostOnRampQuoteQueryOptions, ): UseQueryResult<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` ### Parameters ##### params optional object of type [GetPostOnRampQuoteParams](https://portal.thirdweb.com/references/typescript/v5/GetPostOnRampQuoteParams) #### Type `let params: { buyWithFiatStatus: [BuyWithFiatStatus](https://portal.thirdweb.com/references/typescript/v5/BuyWithFiatStatus); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }; ` ##### queryOptions optional #### Type `let queryOptions: PostOnRampQuoteQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult<[BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote)>; ` Object of type [BuyWithCryptoQuote](https://portal.thirdweb.com/references/typescript/v5/BuyWithCryptoQuote) which contains the information about the quote such as processing fees, estimated time, converted token amounts, etc. ## useReadContract ### Signature#1 A hook to read state from a contract that automatically updates when the contract changes. You can use raw read calls or read [ extensions](https://portal.thirdweb.com/react/v5/extensions) to read from a contract. #### Example `import { getContract } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { useReadContract } from "thirdweb/react"; const contract = getContract({ client, address: "0x...", chain: sepolia, }); const { data, isLoading } = useReadContract({ contract, method: "function tokenURI(uint256 tokenId) returns (string)" params: [1n], }); ` ##### Signature `function useReadContract( options: WithPickedOnceQueryOptions< [ReadContractOptions](https://portal.thirdweb.com/references/typescript/v5/ReadContractOptions) >, ): UseQueryResult< [ReadContractResult](https://portal.thirdweb.com/references/typescript/v5/ReadContractResult)< ParseMethod>["outputs"] > >; ` #### Parameters ##### options The options for reading from a contract ##### Type `let options: WithPickedOnceQueryOptions< [ReadContractOptions](https://portal.thirdweb.com/references/typescript/v5/ReadContractOptions) >; ` #### Returns ##### Return Type `let returnType: UseQueryResult< [ReadContractResult](https://portal.thirdweb.com/references/typescript/v5/ReadContractResult)< ParseMethod>["outputs"] > >; ` a UseQueryResult object. ### Signature#2 A hook to read state from a contract that automatically updates when the contract changes. You can use raw read calls or read [ extensions](https://portal.thirdweb.com/react/v5/extensions) to read from a contract. #### Example Read a contract extension let you do complex contract queries with less code. `import { useReadContract } from "thirdweb/react"; import { getOwnedNFTs } form "thirdweb/extensions/erc721"; const { data, isLoading } = useReadContract(getOwnedNFTs, { contract, owner: address }); ` ##### Signature `function useReadContract( extension: Extension, options: WithPickedOnceQueryOptions< [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions) >, ): UseQueryResult; ` #### Parameters ##### extension An extension to call. ##### Type `let extension: Extension; ` ##### options The read extension params. ##### Type `let options: WithPickedOnceQueryOptions< [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions) >; ` #### Returns ##### Return Type `let returnType: UseQueryResult; ` a UseQueryResult object. ## useSendBatchTransaction A hook to send a transaction. ### Example `import { useSendBatchTransaction } from "thirdweb/react"; const { mutate: sendBatch, data: transactionResult } = useSendBatchTransaction(); // later sendBatch([tx1, tx2]); ` ##### Signature `` function useSendBatchTransaction(): UseMutationResult< { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }, Error, Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)> >; `` ### Returns ##### Return Type `` let returnType: UseMutationResult< { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }, Error, Array<[PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)> >; `` A mutation object to send a transaction. ## useSendAndConfirmTransaction A hook to send a transaction. ### Example `import { useSendAndConfirmTransaction } from "thirdweb/react"; const { mutate: sendAndConfirmTx, data: transactionReceipt } = useSendAndConfirmTransaction(); // later sendAndConfirmTx(tx); ` #### Gasless usage with [ thirdweb Engine](https://portal.thirdweb.com/engine) `import { useSendAndConfirmTransaction } from "thirdweb/react"; const mutation = useSendAndConfirmTransaction({ gasless: { provider: "engine", relayerUrl: "https://thirdweb.engine-***.thirdweb.com/relayer/***", relayerForwarderAddress: "0x...", }, }); ` #### Gasless usage with OpenZeppelin `import { useSendAndConfirmTransaction } from "thirdweb/react"; const mutation = useSendAndConfirmTransaction({ gasless: { provider: "openzeppelin", relayerUrl: "https://...", relayerForwarderAddress: "0x...", }, }); ` ##### Signature `function useSendAndConfirmTransaction( config: SendAndConfirmTransactionConfig, ): UseMutationResult<[TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt), Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)>; ` ### Parameters ##### config #### Type `let config: SendAndConfirmTransactionConfig; ` ### Returns ##### Return Type `let returnType: UseMutationResult< [TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt), Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; ` A mutation object to send a transaction. ## useSendTransaction A hook to send a transaction with from the user's connected wallet. You can send a transaction with a [ prepared contract call](https://portal.thirdweb.com/references/typescript/v5/prepareContractCall) , a [ prepared transaction](https://portal.thirdweb.com/references/typescript/v5/prepareTransaction) , or using a write [ Extension](https://portal.thirdweb.com/react/v5/extensions) . ### Example #### Sending a prepared contract call `import { useSendTransaction } from "thirdweb/react"; import { getContract, prepareContractCall } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const contract = getContract({ address: "0x...", chain: sepolia, client, }); const { mutate: sendTx, data: transactionResult } = useSendTransaction(); const onClick = () => { const transaction = prepareContractCall({ contract, method: "function transfer(address to, uint256 value)", params: [to, value], }); sendTx(transaction); }; ` #### Using a write extension `import { useSendTransaction } from "thirdweb/react"; import { mintTo } from "thirdweb/extensions/erc721"; const { mutate: sendTx, data: transactionResult } = useSendTransaction(); const onClick = () => { const transaction = mintTo({ contract, to: "0x...", nft: { name: "NFT Name", description: "NFT Description", image: "https://example.com/image.png", }, }); sendTx(transaction); }; ` #### Sending a prepared transaction `import { useSendTransaction } from "thirdweb/react"; import { prepareTransaction } from "thirdweb"; import { sepolia } from "thirdweb/chains"; const { mutate: sendTx, data: transactionResult } = useSendTransaction(); const onClick = () => { // Send 0.1 SepoliaETH to an address const transaction = prepareTransaction({ to: "0x...", value: toWei("0.1"), chain: sepolia, client: thirdwebClient, }); sendTx(transaction); }; ` ##### Signature `` function useSendTransaction( config: [SendTransactionConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionConfig), ): UseMutationResult< { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }, Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; `` ### Parameters ##### config Configuration for the `useSendTransaction` hook. Refer to [SendTransactionConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionConfig) for more details. #### Type `let config: { gasless?: [GaslessOptions](https://portal.thirdweb.com/references/typescript/v5/GaslessOptions); payModal?: [SendTransactionPayModalConfig](https://portal.thirdweb.com/references/typescript/v5/SendTransactionPayModalConfig); }; ` ### Returns ##### Return Type `` let returnType: UseMutationResult< { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }, Error, [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction) >; `` A UseMutationResult object to send a transaction. ## useSimulateTransaction A hook to simulate a transaction. ### Example `import { useSimulateTransaction } from "thirdweb/react"; const { mutate: simulateTx } = useSimulateTransaction(); // later const result = await simulateTx(tx); ` ##### Signature `function useSimulateTransaction(): UseMutationResult< any, Error, [SimulateOptions](https://portal.thirdweb.com/references/typescript/v5/SimulateOptions) >; ` ### Returns ##### Return Type `let returnType: UseMutationResult< any, Error, [SimulateOptions](https://portal.thirdweb.com/references/typescript/v5/SimulateOptions) >; ` A mutation object to simulate a transaction. ## useSetActiveWallet A hook that lets you set the active wallet. ### Example `import { useSetActiveWallet } from "thirdweb/react"; const setActiveWallet = useSetActiveWallet(); // later in your code await setActiveWallet(wallet); ` ##### Signature `function useSetActiveWallet(): ( activeWallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet), ) => Promise; ` ### Returns ##### Return Type `let returnType: (activeWallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => Promise; ` A function that lets you set the active wallet. ## useSocialProfiles Fetches the wallet's available social profiles. ### Example `import { useSocialProfiles } from "thirdweb/react"; const { data: profiles } = useSocialProfiles({ client, address: "0x...", }); ` ##### Signature `function useSocialProfiles(options: { address: undefined | string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); }): UseQueryResult, Error>; ` ### Parameters ##### options The options to use when fetching the social profiles. #### Type `let options: { address: undefined | string; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient) }; ` ### Returns ##### Return Type `let returnType: UseQueryResult, Error>; ` A React Query result containing the social profiles. ## useSwitchActiveWalletChain Switch to blockchain with given chain id in the active wallet. ### Example `import { useSwitchActiveWalletChain } from "thirdweb/react"; import { sepolia } from "thirdweb/chains"; const switchChain = useSwitchActiveWalletChain(); // later in your code ; ` ##### Signature `function useSwitchActiveWalletChain(): ( chain: Readonly, ) => Promise; ` ### Returns ##### Return Type `let returnType: (chain: Readonly) => Promise; ` A function to switch to blockchain with given chain id in the active wallet. ## useUnlinkProfile Unlinks a web2 or web3 profile currently connected in-app or ecosystem account. _When a profile is unlinked from the account, it will no longer be able to be used to sign into the account._ ### Example #### Unlinking an email account `import { useUnlinkProfile } from "thirdweb/react"; const { data: connectedProfiles, isLoading } = useProfiles({ client: props.client, }); const { mutate: unlinkProfile } = useUnlinkProfile(); const onClick = () => { unlinkProfile({ client, // Select any other profile you want to unlink profileToUnlink: connectedProfiles[1], }); }; ` ##### Signature `function useUnlinkProfile(): UseMutationResult< void, Error, { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); profileToUnlink: [Profile](https://portal.thirdweb.com/references/typescript/v5/Profile) }, unknown >; ` ### Returns ##### Return Type `let returnType: UseMutationResult< void, Error, { client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); profileToUnlink: [Profile](https://portal.thirdweb.com/references/typescript/v5/Profile) }, unknown >; ` ## useWaitForReceipt A hook to wait for a transaction receipt. ### Example `import { useWaitForReceipt } from "thirdweb/react"; const { data: receipt, isLoading } = useWaitForReceipt({ client, chain, transactionHash, }); ` ##### Signature `` function useWaitForReceipt( options: | undefined | { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }, ): UseQueryResult; `` ### Parameters ##### options The options for waiting for a transaction receipt. #### Type `` let options: | undefined | { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: UseQueryResult; ` a query object. ## useWalletImage Returns the wallet icon for the provided wallet id. ### Example `import { useWalletImage } from "thirdweb/react"; const { data: walletImage } = useWalletImage("io.metamask"); return MetaMask logo; ` ##### Signature `function useWalletImage( id: undefined | [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId), ): UseQueryResult; ` ### Parameters ##### id #### Type `let id: undefined | [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); ` ### Returns ##### Return Type `let returnType: UseQueryResult; ` ## useWalletDetailsModal Hook to open the Wallet Details Modal that shows various information about the connected wallet and allows users to perform various actions like sending funds, receiving funds, switching networks, Buying tokens, etc. ### Example #### Basic usage `import { createThirdwebClient } from "thirdweb"; import { useWalletDetailsModal } from "thirdweb/react"; const client = createThirdwebClient({ clientId: "", }); function Example() { const detailsModal = useWalletDetailsModal(); function handleClick() { detailsModal.open({ client, theme: "light" }); } return ; } ` #### Callback for when the modal is closed `detailsModal.open({ client, onClose: (screen: string) => console.log({ screen }), }); ` ##### Signature `function useWalletDetailsModal(): { open: (props: [UseWalletDetailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseWalletDetailsModalOptions)) => void; }; ` ### Returns ##### Return Type `let returnType: { open: (props: [UseWalletDetailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/UseWalletDetailsModalOptions)) => void; }; ` ## useWalletBalance Fetch the balance of a wallet in native currency or for a specific token. Leave `tokenAddress` undefined to fetch the native token balance. ### Example #### Fetching the native token balance `import { useWalletBalance } from "thirdweb/react"; const { data, isLoading, isError } = useWalletBalance({ chain, address, client, }); console.log("balance", data?.displayValue, data?.symbol); ` #### Fetching a specific token balance `import { useWalletBalance } from "thirdweb/react"; const tokenAddress = "0x..."; // the ERC20 token address const { data, isLoading, isError } = useWalletBalance({ chain, address, client, tokenAddress, }); console.log("balance", data?.displayValue, data?.symbol); ` ##### Signature `function useWalletBalance( options: { address: undefined | string; chain: undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); tokenAddress?: string; }, queryOptions?: UseWalletBalanceQueryOptions, ): UseQueryResult; ` ### Parameters ##### options GetWalletBalanceOptions - The options for fetching the wallet balance. #### Type `let options: { address: undefined | string; chain: undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); tokenAddress?: string; }; ` ##### queryOptions optional #### Type `let queryOptions: UseWalletBalanceQueryOptions; ` ### Returns ##### Return Type `let returnType: UseQueryResult; ` GetWalletBalanceResult The result of the query. ## useWalletInfo Returns the wallet info for the provided wallet id. ### Example `import { useWalletInfo } from "thirdweb/react"; const { data: walletInfo } = useWalletInfo("io.metamask"); console.log("wallet name", walletInfo?.name); ` ##### Signature `function useWalletInfo( id: undefined | [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId), ): UseQueryResult<[WalletInfo](https://portal.thirdweb.com/references/typescript/v5/WalletInfo), Error>; ` ### Parameters ##### id #### Type `let id: undefined | [WalletId](https://portal.thirdweb.com/references/typescript/v5/WalletId); ` ### Returns ##### Return Type `let returnType: UseQueryResult<[WalletInfo](https://portal.thirdweb.com/references/typescript/v5/WalletInfo), Error>; ` ## verifyContractWalletSignature ### Example `import { verifyContractWalletSignature } from 'thirdweb/auth'; const isValid = await verifyContractWalletSignature({ message: '0x..', signature: '0x..', address: '0x...', chain: ..., client: ..., }); ` ##### Signature `` function verifyContractWalletSignature(__namedParameters: { accountFactory?: { address: string; verificationCalldata: `0x${string}`; }; address: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); message: Message; signature: string | Uint8Array; }): Promise; `` ### Parameters ##### \_\_namedParameters #### Type `` let __namedParameters: { accountFactory?: { address: string; verificationCalldata: `0x${string}`; }; address: string; chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); message: Message; signature: string | Uint8Array; }; `` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating whether the signature is valid. ## verifyEOASignature Verifies the signature of a message using an Ethereum account's EOA (Externally Owned Account). ### Example `import { verifyEOASignature } from "thirdweb/auth"; const isValid = await verifyEOASignature({ message: "0x1234567890123456789012345678901234567890", signature: "0x1234567890123456789012345678901234567890", address: "0x1234567890123456789012345678901234567890", }); ` ##### Signature `function verifyEOASignature( options: [VerifyEOASignatureParams](https://portal.thirdweb.com/references/typescript/v5/VerifyEOASignatureParams), ): Promise; ` ### Parameters ##### options The options for verifying the signature. #### Type `let options: { address: string; message: string | Message; signature: string | Uint8Array; }; ` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating whether the signature is valid. ## verifySignature Verifies the signature based on the provided options. Handles smart contract wallet signatures and EOA signatures. _IMPORTANT: in order to check smart contract signatures, a chain and client must be provided. Or, you can use the `verifyContractWalletSignature` function directly if all signatures will be from smart accounts._ verifyContractWalletSignature ### Example `import { verifySignature } from "thirdweb/auth"; const isValid = await verifySignature({ message: "Your message to sign", signature: "0x91db0222ec371a8c18d3b187a6d2e77789bffca1b96826ef6b8708e0d4a66c80312fc3ae95b8fbc147265abf539bb6f360152be61a0e1411d7f5771a599e769a1c", address: "0xda9C7A86AeE76701FC1c23ae548e8E93Ba3e42A5", client: thirdwebClient, chain: chain, }); ` ##### Signature `` function verifySignature(options: { accountFactory?: { address: string; verificationCalldata: `0x${string}`; }; address: string; chain?: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; client?: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); message: Message & (Message | undefined); signature: (string | Uint8Array) & (undefined | string | Uint8Array); }): Promise; `` ### Parameters ##### options The options for signature verification. #### Type `` let options: { accountFactory?: { address: string; verificationCalldata: `0x${string}`; }; address: string; chain?: Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; client?: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); message: Message & (Message | undefined); signature: (string | Uint8Array) & (undefined | string | Uint8Array); }; `` ### Returns ##### Return Type `let returnType: Promise; ` A boolean indicating whether the signature is valid or not. ## verifyTypedData ### Example `import { verifyTypedData } from "thirdweb/utils"; const isValid = await verifyTypedData({ address: "0x...", signature: "0x...", client, chain, domain: { name: "Ether Mail", version: "1", chainId: 1, verifyingContract: "0x0000000000000000000000000000000000000000", }, primaryType: "Mail", types: { Person: [ { name: "name", type: "string" }, { name: "wallet", type: "address" }, ], Mail: [ { name: "from", type: "Person" }, { name: "to", type: "Person" }, { name: "contents", type: "string" }, ], }, message: { from: { name: "Cow", wallet: "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826", }, to: { name: "Bob", wallet: "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB", }, contents: "Hello, Bob!", }, }); ` ##### Signature `function verifyTypedData( __namedParameters: [VerifyTypedDataParams](https://portal.thirdweb.com/references/typescript/v5/VerifyTypedDataParams), ): Promise; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: [VerifyTypedDataParams](https://portal.thirdweb.com/references/typescript/v5/VerifyTypedDataParams); ` ### Returns ##### Return Type `let returnType: Promise; ` A promise that resolves to `true` if the signature is valid, or `false` otherwise. ## verifyContract Verifies a contract by performing the following steps: * Resolves the implementation of the contract. * Extracts the IPFS URI from the contract bytecode. * Downloads the contract source code from the IPFS URI. * Fetches the source files from the compiler metadata. * Compiles the contract source code using the Solidity compiler. * Fetches the constructor parameters if not provided. * Sends a request to the contract verification API to verify the contract source code. ### Example `import { getContract } from "thirdweb/contract"; import { verifyContract } from "thirdweb/contract"; const contract = getContract({ ... }); const verificationResult = await verifyContract({ contract, explorerApiUrl: "https://api.polygonscan.com/api", explorerApiKey: "YOUR_API_KEY", }); console.log(verificationResult); ` ##### Signature `function verifyContract( options: VerifyContractOptions, ): Promise>; ` ### Parameters ##### options The options for contract verification. #### Type `let options: VerifyContractOptions; ` ### Returns ##### Return Type `let returnType: Promise>; ` A promise that resolves to the verification result. ## canExecute Simulate the `execute` method of the Vote contract, to check if you can execute a proposal ### Example `import { canExecute } from "thirdweb/extensions/vote"; const executable = await canExecute({ contract, proposalId }); ` ##### Signature `function canExecute( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ proposalId: bigint }>, ): Promise; ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ proposalId: bigint }>; ` ### Returns ##### Return Type `let returnType: Promise; ` boolean - `true` if the proposal is executable, else `false` ## castVoteBySig Prepares a transaction to call the "castVoteBySig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { castVoteBySig } from "thirdweb/extensions/vote"; const transaction = castVoteBySig({ contract, proposalId: ..., support: ..., v: ..., r: ..., s: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function castVoteBySig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteBySigParams) | { asyncParams: () => Promise<[CastVoteBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteBySigParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "castVoteBySig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteBySigParams) | { asyncParams: () => Promise<[CastVoteBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteBySigParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## castVote Prepares a transaction to call the "castVote" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { castVote } from "thirdweb/extensions/vote"; const transaction = castVote({ contract, proposalId: ..., support: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function castVote( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [CastVoteParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteParams) | { asyncParams: () => Promise<[CastVoteParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "castVote" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [CastVoteParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteParams) | { asyncParams: () => Promise<[CastVoteParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## castVoteWithReason Prepares a transaction to call the "castVoteWithReason" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { castVoteWithReason } from "thirdweb/extensions/vote"; const transaction = castVoteWithReason({ contract, proposalId: ..., support: ..., reason: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function castVoteWithReason( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonParams) | { asyncParams: () => Promise<[CastVoteWithReasonParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "castVoteWithReason" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonParams) | { asyncParams: () => Promise<[CastVoteWithReasonParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## execute Prepares a transaction to call the "execute" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { execute } from "thirdweb/extensions/vote"; const transaction = execute({ contract, targets: ..., values: ..., calldatas: ..., descriptionHash: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function execute( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ExecuteParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteParams) | { asyncParams: () => Promise<[ExecuteParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "execute" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ExecuteParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteParams) | { asyncParams: () => Promise<[ExecuteParams](https://portal.thirdweb.com/references/typescript/v5/ExecuteParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## castVoteWithReasonAndParamsBySig Prepares a transaction to call the "castVoteWithReasonAndParamsBySig" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { castVoteWithReasonAndParamsBySig } from "thirdweb/extensions/vote"; const transaction = castVoteWithReasonAndParamsBySig({ contract, proposalId: ..., support: ..., reason: ..., params: ..., v: ..., r: ..., s: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function castVoteWithReasonAndParamsBySig( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonAndParamsBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsBySigParams) | { asyncParams: () => Promise<[CastVoteWithReasonAndParamsBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsBySigParams)>; } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "castVoteWithReasonAndParamsBySig" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonAndParamsBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsBySigParams) | { asyncParams: () => Promise<[CastVoteWithReasonAndParamsBySigParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsBySigParams)>; } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## castVoteWithReasonAndParams Prepares a transaction to call the "castVoteWithReasonAndParams" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { castVoteWithReasonAndParams } from "thirdweb/extensions/vote"; const transaction = castVoteWithReasonAndParams({ contract, proposalId: ..., support: ..., reason: ..., params: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function castVoteWithReasonAndParams( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonAndParamsParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsParams) | { asyncParams: () => Promise<[CastVoteWithReasonAndParamsParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsParams)>; } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "castVoteWithReasonAndParams" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [CastVoteWithReasonAndParamsParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsParams) | { asyncParams: () => Promise<[CastVoteWithReasonAndParamsParams](https://portal.thirdweb.com/references/typescript/v5/CastVoteWithReasonAndParamsParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## getAll Get all proposals from a Vote contract with some extra info attached for each proposal (current state and votes) ### Example `import { getAll } from "thirdweb/extension/getAll"; const allProposals = await getAll({ contract }); ` ##### Signature `function getAll( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise>; ` ### Parameters ##### options #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: { description: string; endBlock: bigint; executions: Array<{ nativeTokenValue: bigint | undefined; toAddress: string | undefined; transactionData: [Hex](https://portal.thirdweb.com/references/typescript/v5/Hex) | undefined; }>; proposalId: bigint; proposer: string; startBlock: bigint; state: number; stateLabel: string | undefined; votes: ProposalVoteInfo; }; ` An array containing proposals data ## getAllProposals Calls the "getAllProposals" function on the contract. ### Example `import { getAllProposals } from "thirdweb/extensions/vote"; const result = await getAllProposals({ contract, }); ` ##### Signature `` function getAllProposals(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)) : Promise; description: string; endBlock: bigint; proposalId: bigint; proposer: string; signatures: readonly Array; startBlock: bigint; targets: readonly Array; values: readonly Array }>> `` ### Parameters ##### options The options for the getAllProposals function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `` let returnType: Promise; description: string; endBlock: bigint; proposalId: bigint; proposer: string; signatures: readonly Array; startBlock: bigint; targets: readonly Array; values: readonly Array }>> `` The parsed result of the function call. ## executeProposal Execute a Proposal ### Example `import { executeProposal } from "thirdweb/extensions/vote"; const transaction = executeProposal({ contract, proposalId }); const tx = await sendTransaction({ transaction, account }); ` ##### Signature `function executeProposal( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ proposalId: bigint }>, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ proposalId: bigint }>; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` a prepared transaction for the `execute` method ## getProposalVoteCounts Get the info about Against, For and Abstain votes of a proposal ### Example `import { getProposalVoteCounts } from "thirdweb/extensions/vote"; const data = await getProposalVoteCounts({ contract, proposalId }); // Example result { for: 12000000000000000000n, // 12 tokens (with a decimals of 18) were used to vote "for" against: 7000000000000000000n, // 7 tokens (with a decimals of 18) were used to vote "against" abstain: 0n, // no user has voted abstain on this proposal } ` ##### Signature `function getProposalVoteCounts( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalVotesParams](https://portal.thirdweb.com/references/typescript/v5/ProposalVotesParams)>, ): Promise; ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalVotesParams](https://portal.thirdweb.com/references/typescript/v5/ProposalVotesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` the object containing the info about Against, For and Abstain votes of a proposal Note: the count is displayed in "wei" ## getVotes Calls the "getVotes" function on the contract. ### Example `import { getVotes } from "thirdweb/extensions/vote"; const result = await getVotes({ contract, account: ..., blockNumber: ..., }); ` ##### Signature `function getVotes( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetVotesParams](https://portal.thirdweb.com/references/typescript/v5/GetVotesParams)>, ): Promise; ` ### Parameters ##### options The options for the getVotes function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetVotesParams](https://portal.thirdweb.com/references/typescript/v5/GetVotesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## getVotesWithParams Calls the "getVotesWithParams" function on the contract. ### Example `import { getVotesWithParams } from "thirdweb/extensions/vote"; const result = await getVotesWithParams({ contract, account: ..., blockNumber: ..., params: ..., }); ` ##### Signature `function getVotesWithParams( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetVotesWithParamsParams](https://portal.thirdweb.com/references/typescript/v5/GetVotesWithParamsParams)>, ): Promise; ` ### Parameters ##### options The options for the getVotesWithParams function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[GetVotesWithParamsParams](https://portal.thirdweb.com/references/typescript/v5/GetVotesWithParamsParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## hashProposal Calls the "hashProposal" function on the contract. ### Example `import { hashProposal } from "thirdweb/extensions/vote"; const result = await hashProposal({ contract, targets: ..., values: ..., calldatas: ..., descriptionHash: ..., }); ` ##### Signature `function hashProposal( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HashProposalParams](https://portal.thirdweb.com/references/typescript/v5/HashProposalParams)>, ): Promise; ` ### Parameters ##### options The options for the hashProposal function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HashProposalParams](https://portal.thirdweb.com/references/typescript/v5/HashProposalParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## hasVoted Calls the "hasVoted" function on the contract. ### Example `import { hasVoted } from "thirdweb/extensions/vote"; const result = await hasVoted({ contract, proposalId: ..., account: ..., }); ` ##### Signature `function hasVoted( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasVotedParams](https://portal.thirdweb.com/references/typescript/v5/HasVotedParams)>, ): Promise; ` ### Parameters ##### options The options for the hasVoted function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[HasVotedParams](https://portal.thirdweb.com/references/typescript/v5/HasVotedParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposalDeadline Calls the "proposalDeadline" function on the contract. ### Example `import { proposalDeadline } from "thirdweb/extensions/vote"; const result = await proposalDeadline({ contract, proposalId: ..., }); ` ##### Signature `function proposalDeadline( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalDeadlineParams](https://portal.thirdweb.com/references/typescript/v5/ProposalDeadlineParams)>, ): Promise; ` ### Parameters ##### options The options for the proposalDeadline function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalDeadlineParams](https://portal.thirdweb.com/references/typescript/v5/ProposalDeadlineParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposalIndex Calls the "proposalIndex" function on the contract. ### Example `import { proposalIndex } from "thirdweb/extensions/vote"; const result = await proposalIndex({ contract, }); ` ##### Signature `function proposalIndex( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the proposalIndex function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposalExists Check if a proposal exists based on a given proposalId ### Example `` import { proposalExists } from "thirdweb/extensions/vote"; // Check if the proposal with proposalId `4` exists const exists = await proposalExists({ contract, proposalId: 4n }); // either `true` or `false` `` ##### Signature `function proposalExists( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[StateParams](https://portal.thirdweb.com/references/typescript/v5/StateParams)>, ): Promise; ` ### Parameters ##### options #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[StateParams](https://portal.thirdweb.com/references/typescript/v5/StateParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` `true` if the proposal exists, else `false` ## proposalSnapshot Calls the "proposalSnapshot" function on the contract. ### Example `import { proposalSnapshot } from "thirdweb/extensions/vote"; const result = await proposalSnapshot({ contract, proposalId: ..., }); ` ##### Signature `function proposalSnapshot( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalSnapshotParams](https://portal.thirdweb.com/references/typescript/v5/ProposalSnapshotParams)>, ): Promise; ` ### Parameters ##### options The options for the proposalSnapshot function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalSnapshotParams](https://portal.thirdweb.com/references/typescript/v5/ProposalSnapshotParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposalVotes Calls the "proposalVotes" function on the contract. ### Example `import { proposalVotes } from "thirdweb/extensions/vote"; const result = await proposalVotes({ contract, proposalId: ..., }); ` ##### Signature `function proposalVotes( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalVotesParams](https://portal.thirdweb.com/references/typescript/v5/ProposalVotesParams)>, ): Promise; ` ### Parameters ##### options The options for the proposalVotes function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalVotesParams](https://portal.thirdweb.com/references/typescript/v5/ProposalVotesParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposalThreshold Calls the "proposalThreshold" function on the contract. ### Example `import { proposalThreshold } from "thirdweb/extensions/vote"; const result = await proposalThreshold({ contract, }); ` ##### Signature `function proposalThreshold( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the proposalThreshold function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## proposals Calls the "proposals" function on the contract. ### Example `import { proposals } from "thirdweb/extensions/vote"; const result = await proposals({ contract, key: ..., }); ` ##### Signature `function proposals( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalsParams](https://portal.thirdweb.com/references/typescript/v5/ProposalsParams)>, ): Promise; ` ### Parameters ##### options The options for the proposals function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[ProposalsParams](https://portal.thirdweb.com/references/typescript/v5/ProposalsParams)>; ` ### Returns ##### Return Type `let returnType: Promise< readonly [bigint, string, bigint, bigint, string] >; ` The parsed result of the function call. ## propose Prepares a transaction to call the "propose" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { propose } from "thirdweb/extensions/vote"; const transaction = propose({ contract, targets: ..., values: ..., calldatas: ..., description: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function propose( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ProposeParams](https://portal.thirdweb.com/references/typescript/v5/ProposeParams) | { asyncParams: () => Promise<[ProposeParams](https://portal.thirdweb.com/references/typescript/v5/ProposeParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "propose" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [ProposeParams](https://portal.thirdweb.com/references/typescript/v5/ProposeParams) | { asyncParams: () => Promise<[ProposeParams](https://portal.thirdweb.com/references/typescript/v5/ProposeParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## quorumDenominator Calls the "quorumDenominator" function on the contract. ### Example `import { quorumDenominator } from "thirdweb/extensions/vote"; const result = await quorumDenominator({ contract, }); ` ##### Signature `function quorumDenominator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the quorumDenominator function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## quorumNumeratorByBlockNumber Calls the "quorumDenominator" function on the contract with an extra param called `blockNumber` . This extension is similar to the `quorumDenominator` extension, except that it takes in a bigint (blockNumber) ### Example `import { quorumNumeratorByBlockNumber } from "thirdweb/extensions/vote"; const result = await quorumNumeratorByBlockNumber({ contract, blockNumber: 13232234232n, }); ` ##### Signature `function quorumNumeratorByBlockNumber( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ blockNumber: bigint }>, ): Promise; ` ### Parameters ##### options The options for the quorumDenominator function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<{ blockNumber: bigint }>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## relay Prepares a transaction to call the "relay" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { relay } from "thirdweb/extensions/vote"; const transaction = relay({ contract, target: ..., value: ..., data: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function relay( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RelayParams](https://portal.thirdweb.com/references/typescript/v5/RelayParams) | { asyncParams: () => Promise<[RelayParams](https://portal.thirdweb.com/references/typescript/v5/RelayParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "relay" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< [RelayParams](https://portal.thirdweb.com/references/typescript/v5/RelayParams) | { asyncParams: () => Promise<[RelayParams](https://portal.thirdweb.com/references/typescript/v5/RelayParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setProposalThreshold Prepares a transaction to call the "setProposalThreshold" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setProposalThreshold } from "thirdweb/extensions/vote"; const transaction = setProposalThreshold({ contract, newProposalThreshold: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setProposalThreshold( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetProposalThresholdParams](https://portal.thirdweb.com/references/typescript/v5/SetProposalThresholdParams) | { asyncParams: () => Promise<[SetProposalThresholdParams](https://portal.thirdweb.com/references/typescript/v5/SetProposalThresholdParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setProposalThreshold" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetProposalThresholdParams](https://portal.thirdweb.com/references/typescript/v5/SetProposalThresholdParams) | { asyncParams: () => Promise<[SetProposalThresholdParams](https://portal.thirdweb.com/references/typescript/v5/SetProposalThresholdParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## setVotingDelay Prepares a transaction to call the "setVotingDelay" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setVotingDelay } from "thirdweb/extensions/vote"; const transaction = setVotingDelay({ contract, newVotingDelay: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setVotingDelay( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetVotingDelayParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingDelayParams) | { asyncParams: () => Promise<[SetVotingDelayParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingDelayParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setVotingDelay" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetVotingDelayParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingDelayParams) | { asyncParams: () => Promise<[SetVotingDelayParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingDelayParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## state Calls the "state" function on the contract. ### Example `import { state } from "thirdweb/extensions/vote"; const result = await state({ contract, proposalId: ..., }); ` ##### Signature `function state( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[StateParams](https://portal.thirdweb.com/references/typescript/v5/StateParams)>, ): Promise; ` ### Parameters ##### options The options for the state function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[StateParams](https://portal.thirdweb.com/references/typescript/v5/StateParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## setVotingPeriod Prepares a transaction to call the "setVotingPeriod" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { setVotingPeriod } from "thirdweb/extensions/vote"; const transaction = setVotingPeriod({ contract, newVotingPeriod: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function setVotingPeriod( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetVotingPeriodParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingPeriodParams) | { asyncParams: () => Promise<[SetVotingPeriodParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingPeriodParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "setVotingPeriod" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [SetVotingPeriodParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingPeriodParams) | { asyncParams: () => Promise<[SetVotingPeriodParams](https://portal.thirdweb.com/references/typescript/v5/SetVotingPeriodParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## token Calls the "token" function on the contract. ### Example `import { token } from "thirdweb/extensions/vote"; const result = await token({ contract, }); ` ##### Signature `function token(options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)): Promise; ` ### Parameters ##### options The options for the token function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## quorum Calls the "quorum" function on the contract. ### Example `import { quorum } from "thirdweb/extensions/vote"; const result = await quorum({ contract, blockNumber: ..., }); ` ##### Signature `function quorum( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[QuorumParams](https://portal.thirdweb.com/references/typescript/v5/QuorumParams)>, ): Promise; ` ### Parameters ##### options The options for the quorum function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)<[QuorumParams](https://portal.thirdweb.com/references/typescript/v5/QuorumParams)>; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## votingDelay Calls the "votingDelay" function on the contract. ### Example `import { votingDelay } from "thirdweb/extensions/vote"; const result = await votingDelay({ contract, }); ` ##### Signature `function votingDelay( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the votingDelay function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## updateQuorumNumerator Prepares a transaction to call the "updateQuorumNumerator" function on the contract. ### Example `import { sendTransaction } from "thirdweb"; import { updateQuorumNumerator } from "thirdweb/extensions/vote"; const transaction = updateQuorumNumerator({ contract, newQuorumNumerator: ..., overrides: { ... } }); // Send the transaction await sendTransaction({ transaction, account }); ` ##### Signature `function updateQuorumNumerator( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UpdateQuorumNumeratorParams](https://portal.thirdweb.com/references/typescript/v5/UpdateQuorumNumeratorParams) | { asyncParams: () => Promise<[UpdateQuorumNumeratorParams](https://portal.thirdweb.com/references/typescript/v5/UpdateQuorumNumeratorParams)> } >, ): [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction); ` ### Parameters ##### options The options for the "updateQuorumNumerator" function. #### Type `let options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions)< | [UpdateQuorumNumeratorParams](https://portal.thirdweb.com/references/typescript/v5/UpdateQuorumNumeratorParams) | { asyncParams: () => Promise<[UpdateQuorumNumeratorParams](https://portal.thirdweb.com/references/typescript/v5/UpdateQuorumNumeratorParams)> } >; ` ### Returns ##### Return Type `let returnType: [PreparedTransaction](https://portal.thirdweb.com/references/typescript/v5/PreparedTransaction)< any, AbiFunction, [PrepareTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/PrepareTransactionOptions) >; ` A prepared transaction object. ## votingPeriod Calls the "votingPeriod" function on the contract. ### Example `import { votingPeriod } from "thirdweb/extensions/vote"; const result = await votingPeriod({ contract, }); ` ##### Signature `function votingPeriod( options: [BaseTransactionOptions](https://portal.thirdweb.com/references/typescript/v5/BaseTransactionOptions), ): Promise; ` ### Parameters ##### options The options for the votingPeriod function. #### Type `let options: { contract: [ThirdwebContract](https://portal.thirdweb.com/references/typescript/v5/ThirdwebContract) } & T; ` ### Returns ##### Return Type `let returnType: Promise; ` The parsed result of the function call. ## waitForReceipt Waits for the transaction receipt of a given transaction hash on a specific contract. ### Example `import { waitForReceipt } from "thirdweb"; const receipt = await waitForReceipt({ client, chain, transactionHash: "0x123...", }); ` ##### Signature `` function waitForReceipt(options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }): Promise<[TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt)>; `` ### Parameters ##### options The options for waiting for the receipt. By default, it's 100 blocks. #### Type `` let options: { chain: Readonly; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); maxBlocksWaitTime?: number; readonly transactionHash: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` A promise that resolves with the transaction receipt. ## walletConnect Creates a wallet that allows connecting to any wallet that supports the WalletConnect protocol. ### Example `import { walletConnect } from "thirdweb/wallets"; const wallet = walletConnect(); const account = await wallet.connect({ client, }); ` ##### Signature `function walletConnect(): [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"walletConnect">; ` ### Returns ##### Return Type `let returnType: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)<"walletConnect">; ` The created smart wallet. ## waitForUserOpReceipt Wait for the user operation to be mined. ### Example `import { waitForUserOpReceipt } from "thirdweb/wallets/smart"; const receipt = await waitForUserOpReceipt({ chain, client, userOpHash, }); ` ##### Signature `` function waitForUserOpReceipt( args: BundlerOptions & { intervalMs?: number; timeoutMs?: number; userOpHash: `0x${string}`; }, ): Promise<[TransactionReceipt](https://portal.thirdweb.com/references/typescript/v5/TransactionReceipt)>; `` ### Parameters ##### args The options and user operation hash #### Type `` let args: BundlerOptions & { intervalMs?: number; timeoutMs?: number; userOpHash: `0x${string}`; }; `` ### Returns ##### Return Type `let returnType: { blobGasPrice?: quantity; blobGasUsed?: quantity; blockHash: Hash; blockNumber: quantity; contractAddress: Address | null | undefined; cumulativeGasUsed: quantity; effectiveGasPrice: quantity; from: Address; gasUsed: quantity; logs: Array>; logsBloom: Hex; root?: Hash; status: status; to: Address | null; transactionHash: Hash; transactionIndex: index; type: type; }; ` * The transaction receipt ## watchBlockNumber Watches the block number for a specific chain. ### Example `import { watchBlockNumber } from "thirdweb"; const unwatch = watchBlockNumber({ client, chainId, onNewBlockNumber: (blockNumber) => { // do something with the block number }, onError: (err) => { // do something if getting the block number fails }, }); // later stop watching unwatch(); ` ##### Signature `function watchBlockNumber(opts: [WatchBlockNumberOptions](https://portal.thirdweb.com/references/typescript/v5/WatchBlockNumberOptions)): () => void; ` ### Parameters ##### opts The options for watching the block number. #### Type `let opts: { chain: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); latestBlockNumber?: bigint; onError?: (error: Error) => void; onNewBlockNumber: (blockNumber: bigint) => void; overPollRatio?: number; }; ` ### Returns ##### Return Type `let returnType: () => void; ` The unwatch function. ## watchContractEvents Listens for contract events from the blockchain. ### Example #### Listen to all events for a contract `import { watchContractEvents } from "thirdweb"; const unwatch = watchContractEvents({ contract: myContract, onEvents: (events) => { // do something with the events }, }); ` #### Listen to specific events for a contract `import { prepareEvent, watchContractEvents } from "thirdweb"; const myEvent = prepareEvent({ event: "event MyEvent(uint256 myArg)", }); const events = await watchContractEvents({ contract: myContract, events: [myEvent], onEvents: (events) => { // do something with the events }, }); ` ##### Signature `` function watchContractEvents(options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; events?: abiEvents; latestBlockNumber?: bigint; onEvents: ( events: [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult), ) => void; strict?: TStrict; }): () => void; `` ### Parameters ##### options The options for retrieving contract events. #### Type `` let options: { contract: Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; events?: abiEvents; latestBlockNumber?: bigint; onEvents: ( events: [ParseEventLogsResult](https://portal.thirdweb.com/references/typescript/v5/ParseEventLogsResult), ) => void; strict?: TStrict; }; `` ### Returns ##### Return Type `let returnType: () => void; ` The unwatch function. ## AccountAddress ### Example #### Basic usage `import { AccountProvider, AccountAddress } from "thirdweb/react"; ; ` Result: `0x12345674b599ce99958242b3D3741e7b01841DF3 ` #### Shorten the address `import { AccountProvider, AccountAddress } from "thirdweb/react"; import { shortenAddress } from "thirdweb/utils"; ; ` Result: `0x1234...1DF3 ` ##### Signature `function AccountAddress( __namedParameters: [AccountAddressProps](https://portal.thirdweb.com/references/typescript/v5/AccountAddressProps), ): Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: Element; ` a `` containing the full wallet address of the account ## AccountAvatar The component for showing the avatar of the account. If fetches all the social profiles linked to your wallet, including: Farcaster, ENS, Lens (more to be added) You can choose which social profile you want to display. Defaults to the first item in the list. ### Example #### Basic usage `import { AccountProvider, AccountAvatar } from "thirdweb/react"; ; ` Result: An `` component, if the avatar is resolved successfully ` ` #### Show a loading sign when the avatar is being resolved `import { AccountProvider, AccountAvatar } from "thirdweb/react"; } /> ; ` #### Fallback to something when the avatar fails to resolve `import { AccountProvider, AccountAvatar } from "thirdweb/react"; } /> ; ` #### Select a social profile to display If you wallet associates with more than one social profiles (Lens, Farcaster, ENS, etc.) You can specify which service you want to prioritize using the `socialType` props `import { AccountProvider, AccountAvatar } from "thirdweb/react"; ; ` #### Custom ENS resolver chain This component shares the same props with the ENS extension `resolveAvatar` `import { AccountProvider, AccountAvatar } from "thirdweb/react"; import { base } from "thirdweb/chains"; ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function AccountAvatar( __namedParameters: [AccountAvatarProps](https://portal.thirdweb.com/references/typescript/v5/AccountAvatarProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resolverAddress : string,resolverChain : Readonly<(ChainOptions) & ({ rpc: string })>,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,socialType : "farcaster" | "ens" | "lens",spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ### Returns ##### Return Type `let returnType: null | Element; ` An `` if the avatar is resolved successfully ## AccountBalance This component fetches and shows the balance of the wallet address on a given chain. It inherits all the attributes of a HTML `` component, hence you can style it just like how you would style a normal `` ### Example #### Basic usage `import { AccountProvider, AccountBalance } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ; ` Result: `1.091435 ETH ` #### Format the balance (round up, shorten etc.) The AccountBalance component accepts a `formatFn` which takes in an object of type `AccountBalanceInfo` and outputs a string The function is used to modify the display value of the wallet balance (either in crypto or fiat) `` import type { AccountBalanceInfo } from "thirdweb/react"; import { formatNumber } from "thirdweb/utils"; const format = (props: AccountInfoBalance):string => `${formatNumber(props.balance, 1)} ${props.symbol.toLowerCase()}` `` Result: `1.1 eth // the balance is rounded up to 1 decimal and the symbol is lowercased ` #### Show a loading sign when the balance is being fetched `import { AccountProvider, AccountBalance } from "thirdweb/react"; } /> ; ` #### Fallback to something when the balance fails to resolve ` ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function AccountBalance( __namedParameters: [AccountBalanceProps](https://portal.thirdweb.com/references/typescript/v5/AccountBalanceProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,chain : Readonly<(ChainOptions) & ({ rpc: string })>,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (props: AccountBalanceInfo) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,showBalanceInFiat : "USD" | "CAD" | "GBP" | "EUR" | "JPY" | "AUD" | "NZD",slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,tokenAddress : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` ## AccountName This component is used to display the name of the account. A "name" in this context is the username, or account of the social profiles that the wallet may have. In case a name is not found or failed to resolve, you can always fallback to displaying the wallet address instead by using the `fallbackComponent` prop. This component inherits all attribute of a native HTML `` element, so you can style it just like how you would style a `` . ### Example #### Basic usage `import { AccountProvider, AccountName } from "thirdweb/react"; ; ` #### Show wallet address while social name is being loaded `} />; ` #### Fallback to showing wallet address if fail to resolve social name `} />; ` #### Transform the account name using `formatFn` prop `import { isAddress, shortenAddress } from "thirdweb/utils"; import { AccountProvider, AccountName } from "thirdweb/react"; // Let's say we want the name to be capitalized without using CSS const formatName = (name: string) => name.toUpperCase(); return ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function AccountName(props: [AccountNameProps](https://portal.thirdweb.com/references/typescript/v5/AccountNameProps)): null | Element; ` ### Parameters ##### props #### Type `let props: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resolverAddress : string,resolverChain : Readonly<(ChainOptions) & ({ rpc: string })>,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,socialType : "farcaster" | "ens" | "lens",spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` A `` containing the name of the account `{name} ` ## ChainIcon This component tries to resolve the icon of a given chain, then return an image. ### Example #### Basic usage `import { ChainProvider, ChainIcon } from "thirdweb/react"; ; ` Result: An `` component with the src of the icon ` ` #### Override the icon with the `iconResolver` prop If you already have the icon url, you can skip the network requests and pass it directly to the ChainIcon `; ` You can also pass in your own custom (async) function that retrieves the icon url `const getIcon = async () => { const icon = getIconFromCoinMarketCap(chainId, etc); return icon; }; ; ` #### Show a loading sign while the icon is being loaded `} />; ` #### Fallback to a dummy image if the chain icon fails to resolve `} />; ` #### Usage with queryOptions ChainIcon uses useQuery() from tanstack query internally. It allows you to pass a custom queryOptions of your choice for more control of the internal fetching logic `; ` ##### Signature `function ChainIcon(__namedParameters: [ChainIconProps](https://portal.thirdweb.com/references/typescript/v5/ChainIconProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,client : ThirdwebClient,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,iconResolver : string | (() => string) | (() => Promise),id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ### Returns ##### Return Type `let returnType: null | Element; ` an `` with the src of the chain icon ## ChainName This component fetches then shows the name of a chain. It inherits all the attributes of a HTML `` component, hence you can style it just like how you would style a normal `` ### Example #### Basic usage `import { ChainProvider, ChainName } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ; ` Result: `Ethereum Mainnet ` #### Custom name resolver By default ChainName will call the thirdweb API to retrieve the chain name. However if you have a different way to fetch the name, you can pass the function to the `nameResolver` prop. Note: nameResolver should either be a string or a function (async) that returns a string. `async function fetchNameMethod() { // your own fetching logic return "the chain name"; } ; ` Alternatively you can also pass in a string directly: `; ` #### Format the name (capitalize, truncate, etc.) The ChainName component accepts a `formatFn` which takes in a string and outputs a string The function is used to modify the name of the chain `const concatStr = (str: string):string => str + "Network" ` Result: `Ethereum Mainnet Network ` #### Show a loading sign when the name is being fetched `import { ChainProvider, ChainName } from "thirdweb/react"; } /> ; ` #### Fallback to something when the name fails to resolve ` ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function ChainName(__namedParameters: [ChainNameProps](https://portal.thirdweb.com/references/typescript/v5/ChainNameProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` ## ConnectButtonProps Props for the [ConnectButton](https://portal.thirdweb.com/references/typescript/v5/ConnectButton) component `type ConnectButtonProps = { accountAbstraction?: [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); appMetadata?: AppMetadata; auth?: [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); autoConnect?: { timeout: number } | boolean; chain?: [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); chains?: Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; client: [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); connectButton?: [ConnectButton_connectButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectButtonOptions); connectModal?: [ConnectButton_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions); detailsButton?: [ConnectButton_detailsButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsButtonOptions); detailsModal?: [ConnectButton_detailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsModalOptions); locale?: [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); onConnect?: (wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)) => void; onDisconnect?: (info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) }) => void; recommendedWallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; showAllWallets?: boolean; signInButton?: { className?: string; label?: string; style?: React.CSSProperties; }; supportedNFTs?: SupportedNFTs; supportedTokens?: [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); switchButton?: { className?: string; label?: string; style?: React.CSSProperties; }; theme?: "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); walletConnect?: { projectId?: string }; wallets?: Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; }; ` ##### accountAbstraction Enable Account abstraction for all wallets. This will connect to the users's smart account based on the connected personal wallet and the given options. This allows to sponsor gas fees for your user's transaction using the thirdweb account abstraction infrastructure. ` ` `type accountAbstraction = [SmartWalletOptions](https://portal.thirdweb.com/references/typescript/v5/SmartWalletOptions); ` ##### appMetadata Metadata of the app that will be passed to connected wallet. Setting this is highly recommended. Some wallets display this information to the user when they connect to your app. `type appMetadata = AppMetadata; ` ### Example `{ name: "My App", url: "https://my-app.com", description: "some description about your app", logoUrl: "https://path/to/my-app/logo.svg", }; ` ##### auth Enable SIWE (Sign in with Ethererum) by passing an object of type `SiweAuthOptions` to enforce the users to sign a message after connecting their wallet to authenticate themselves. Refer to the [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions) for more details `type auth = [SiweAuthOptions](https://portal.thirdweb.com/references/typescript/v5/SiweAuthOptions); ` ##### autoConnect When the user has connected their wallet to your site, this configuration determines whether or not you want to automatically connect to the last connected wallet when user visits your site again in the future. By default it is set to `{ timeout: 15000 }` meaning that autoConnect is enabled and if the autoConnection does not succeed within 15 seconds, it will be cancelled. If you want to disable autoConnect, set this prop to `false` . If you want to customize the timeout, you can assign an object with a `timeout` key to this prop. `; ` `type autoConnect = { timeout: number } | boolean; ` ##### chain The [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain) object of the blockchain you want the wallet to connect to If a `chain` is not specified, Wallet will be connected to whatever is the default set in the wallet. If a `chain` is specified, Wallet will be prompted to switch to given chain after connection if it is not already connected to it. This ensures that the wallet is connected to the correct blockchain before interacting with your app. The `ConnectButton` also shows a "Switch Network" button until the wallet is connected to the specified chain. Clicking on the "Switch Network" button triggers the wallet to switch to the specified chain. You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `type chain = [Chain](https://portal.thirdweb.com/references/typescript/v5/Chain); ` ### Example `import { polygon } from "thirdweb/chains"; function Example() { return (
{" "} {" "}
); } ` ##### chains Array of chains that your app supports. This is only relevant if your app is a multi-chain app and works across multiple blockchains. If your app only works on a single blockchain, you should only specify the `chain` prop. Given list of chains will used in various ways: * They will be displayed in the network selector in the `ConnectButton` 's details modal post connection * They will be sent to wallet at the time of connection if the wallet supports requesting multiple chains ( example: WalletConnect ) so that users can switch between the chains post connection easily `; ` You can create a `Chain` object using the [defineChain](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. At minimum, you need to pass the `id` of the blockchain to `defineChain` function to create a `Chain` object. `import { defineChain } from "thirdweb/chains"; const polygon = defineChain({ id: 137, }); ` `type chains = Array<[Chain](https://portal.thirdweb.com/references/typescript/v5/Chain)>; ` ##### client A client is the entry point to the thirdweb SDK. It is required for all other actions. You can create a client using the `createThirdwebClient` function. Refer to the [ Creating a Client](https://portal.thirdweb.com/typescript/v5/client) documentation for more information. You must provide a `clientId` or `secretKey` in order to initialize a client. Pass `clientId` if you want for client-side usage and `secretKey` for server-side usage. `import { createThirdwebClient } from "thirdweb"; const client = createThirdwebClient({ clientId: "", }); ` `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### connectButton Configurations for the button element that is shown when wallet is not connected `type connectButton = [ConnectButton_connectButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectButtonOptions); ` ### Example `; ` ##### connectModal Configurations for the `ConnectButton` 's Modal that is shown for connecting a wallet Refer to the [ConnectButton\_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions) type for more details `type connectModal = [ConnectButton_connectModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FconnectModalOptions); ` ### Example `; ` ##### detailsButton Configurations for the Details Button that is shown when wallet is connected Refer to the [ConnectButton\_detailsButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsButtonOptions) type for more details `type detailsButton = [ConnectButton_detailsButtonOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsButtonOptions); ` ### Example `; ` ##### detailsModal Configurations for the Details Modal that is shown when wallet is connected and user clicks on the details button to see the connected wallet details Refer to the [ConnectButton\_detailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsModalOptions) type for more details `type detailsModal = [ConnectButton_detailsModalOptions](https://portal.thirdweb.com/references/typescript/v5/ConnectButton%5FdetailsModalOptions); ` ##### locale By default - ConnectButton UI uses the `en-US` locale for english language users. You can customize the language used in the ConnectButton UI by setting the `locale` prop. Refer to the [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId) type for supported locales. `type locale = [LocaleId](https://portal.thirdweb.com/references/typescript/v5/LocaleId); ` ##### onConnect ##### Signature `function onConnect(wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)): void; ` ##### Parameters ##### wallet ###### Type `let wallet: { getAdminAccount?: () => [Account](https://portal.thirdweb.com/references/typescript/v5/Account) | undefined; getConfig: () => [CreateWalletArgs](https://portal.thirdweb.com/references/typescript/v5/CreateWalletArgs)[1]; id: TWalletId; onConnectRequested?: () => Promise; subscribe: [WalletEmitter](https://portal.thirdweb.com/references/typescript/v5/WalletEmitter)["subscribe"]; autoConnect: ( options: [WalletAutoConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletAutoConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; connect: ( options: [WalletConnectionOption](https://portal.thirdweb.com/references/typescript/v5/WalletConnectionOption), ) => Promise<[Account](https://portal.thirdweb.com/references/typescript/v5/Account)>; disconnect: () => Promise; getAccount: () => undefined | [Account](https://portal.thirdweb.com/references/typescript/v5/Account); getChain: () => | undefined | Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; switchChain: (chain: Readonly) => Promise; }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### onDisconnect ##### Signature `function onDisconnect(info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); }): void; ` ##### Parameters ##### info ###### Type `let info: { account: [Account](https://portal.thirdweb.com/references/typescript/v5/Account); wallet: [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet) }; ` ##### Returns ##### Return Type `let returnType: void; ` ##### recommendedWallets Wallets to show as recommended in the `ConnectButton` 's Modal `type recommendedWallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ##### showAllWallets By default, ConnectButton modal shows a "All Wallets" button that shows a list of 500+ wallets. You can disable this button by setting `showAllWallets` prop to `false` `type showAllWallets = boolean; ` ##### signInButton `type signInButton = { className?: string; label?: string; style?: React.CSSProperties; }; ` ##### supportedNFTs Customize the NFTs shown in the "View Funds" screen in Details Modal for various networks. By default, The "View Funds" screen shows a few popular tokens for default chains and the native token. For other chains it only shows the native token. `type supportedNFTs = SupportedNFTs; ` ### Example supportedTokens prop allows you to customize this list as shown below which shows "Pudgy Penguins" help when users wallet is connected to Ethereum mainnet. `import { ConnectButton } from "thirdweb/react"; function Example() { return ( ); } ` ##### supportedTokens Customize the tokens shown in the "Send Funds" screen in Details Modal for various networks. By default, The "Send Funds" screen shows a few popular tokens for default chains and the native token. For other chains it only shows the native token. `type supportedTokens = [SupportedTokens](https://portal.thirdweb.com/references/typescript/v5/SupportedTokens); ` ### Example supportedTokens prop allows you to customize this list as shown below which shows "Dai Stablecoin" when users wallet is connected to the "Base" mainnet. `import { ConnectButton } from "thirdweb/react"; function Example() { return ( ); } ` ##### switchButton Configuration for the "Switch Network" button. This button is rendered when the wallet is connected, but it is not connected to the `chain` prop provided in `ConnectButton` component `type switchButton = { className?: string; label?: string; style?: React.CSSProperties; }; ` ### Example `; ` ##### theme Set the theme for the `ConnectButton` component. By default it is set to `"dark"` theme can be set to either `"dark"` , `"light"` or a custom theme object. You can also import [lightTheme](https://portal.thirdweb.com/references/typescript/v5/lightTheme)or [darkTheme](https://portal.thirdweb.com/references/typescript/v5/darkTheme)functions from `thirdweb/react` to use the default themes as base and overrides parts of it. `type theme = "dark" | "light" | [Theme](https://portal.thirdweb.com/references/typescript/v5/Theme); ` ### Example `import { lightTheme } from "thirdweb/react"; const customTheme = lightTheme({ colors: { modalBg: "red", }, }); function Example() { return ; } ` ##### walletConnect Configure options for WalletConnect By default WalletConnect uses the thirdweb's default project id. Setting your own project id is recommended. You can create a project id by signing up on [ walletconnect.com](https://walletconnect.com/) `type walletConnect = { projectId?: string }; ` ##### wallets Array of supported wallets. If not provided, default wallets will be used. `type wallets = Array<[Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet)>; ` ### Example `import { AutoConnect } from "thirdweb/react"; import { createWallet, inAppWallet } from "thirdweb/wallets"; const wallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), ]; function Example() { return ; } ` If no wallets are specified. The component will show All the EIP-6963 compliant installed wallet extensions, as well as below default wallets: `const defaultWallets = [ inAppWallet(), createWallet("io.metamask"), createWallet("com.coinbase.wallet"), createWallet("me.rainbow"), createWallet("io.zerion.wallet"), ]; ` The `ConnectButton` also shows a "All wallets" button at the end of wallet list which allows user to connect to any of the 500+ wallets ## NFTDescription This component fetches and displays an NFT's description. It inherits all the attributes of a ``so you can style it just like how you would style a `` element. ### Example #### Basic usage `import { NFTProvider, NFTDescription } from "thirdweb/react"; ; ` #### Show a loading sign while the description is being fetched `import { NFTProvider, NFTDescription } from "thirdweb/react"; } /> ; ` #### Show something in case the description failed to resolve `import { NFTProvider, NFTDescription } from "thirdweb/react"; Failed to load description} /> ; ` #### Custom query options for useQuery (tanstack-query) `import { NFTProvider, NFTDescription } from "thirdweb/react"; ; ` #### Override the description with the `descriptionResolver` prop If you already have the url, you can skip the network requests and pass it directly to the NFTDescription `; ` You can also pass in your own custom (async) function that retrieves the description `const getDescription = async () => { // ... return description; }; ; ` ##### Signature `function NFTDescription( __namedParameters: [NFTDescriptionProps](https://portal.thirdweb.com/references/typescript/v5/NFTDescriptionProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),descriptionResolver : string | (() => string) | (() => Promise),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` A `` element containing the description of the NFT ## NFTName This component fetches and displays an NFT's name. It takes in a `className` and `style` props so you can style it just like how you would style a `` element. ### Example #### Basic usage `import { NFTProvider, NFTName } from "thirdweb/react"; ; ` #### Show a loading sign while the name is being fetched `import { NFTProvider, NFTName } from "thirdweb/react"; } /> ; ` #### Show something in case the name failed to resolve `import { NFTProvider, NFTName } from "thirdweb/react"; Failed to load name} /> ; ` #### Custom query options for useQuery (tanstack-query) `import { NFTProvider, NFTName } from "thirdweb/react"; ; ` #### Override the name with the `nameResolver` prop If you already have the name, you can skip the network requests and pass it directly to the NFTName `; ` You can also pass in your own custom (async) function that retrieves the name `const getName = async () => { // ... return name; }; ; ` ##### Signature `function NFTName(__namedParameters: [NFTNameProps](https://portal.thirdweb.com/references/typescript/v5/NFTNameProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` A `` element containing the name of the NFT ## SocialIcon Social auth provider icon ### Example `import { SocialIcon } from "thirdweb/react"; ; ` Result: An `` component with the src of the icon ` ` ##### Signature `function SocialIcon(__namedParameters: [SocialIconProps](https://portal.thirdweb.com/references/typescript/v5/SocialIconProps)): Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,provider : string,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ### Returns ##### Return Type `let returnType: Element; ` an `` component with the src set to the svg ## TokenIcon This component tries to resolve the icon of a given token, then return an image. ### Example #### Basic usage `import { TokenProvider, TokenIcon } from "thirdweb/react"; ; ` Result: An `` component with the src of the icon ` ` #### Override the icon with the `iconResolver` prop If you already have the icon url, you can skip the network requests and pass it directly to the TokenIcon `; ` You can also pass in your own custom (async) function that retrieves the icon url `const getIcon = async () => { const icon = getIconFromCoinMarketCap(tokenAddress, etc); return icon; }; ; ` #### Show a loading sign while the icon is being loaded `} />; ` #### Fallback to a dummy image if the token icon fails to resolve `} />; ` #### Usage with queryOptions TokenIcon uses useQuery() from tanstack query internally. It allows you to pass a custom queryOptions of your choice for more control of the internal fetching logic `; ` ##### Signature `function TokenIcon(__namedParameters: [TokenIconProps](https://portal.thirdweb.com/references/typescript/v5/TokenIconProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,iconResolver : string | (() => string) | (() => Promise),id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ### Returns ##### Return Type `let returnType: null | Element; ` an `` with the src of the token icon ## TokenName This component fetches then shows the name of a token. For ERC20 tokens, it calls the `name` function in the ERC20 contract. It inherits all the attributes of a HTML `` component, hence you can style it just like how you would style a normal `` ### Example #### Basic usage `import { TokenProvider, TokenName } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ; ` Result: `Ether ` #### Custom name resolver By default TokenName will call the `name` method of the token contract. However if you have a different way to fetch the name, you can pass the function to the `nameResolver` prop. Note: nameResolver should either be a string or a function (async) that returns a string. `async function fetchNameMethod() { // your own fetching logic return "the token name"; } ; ` Alternatively you can also pass in a string directly: `; ` #### Format the name (capitalize, truncate, etc.) The TokenName component accepts a `formatFn` which takes in a string and outputs a string The function is used to modify the name of the token `const concatStr = (str: string):string => str + "Token" ` Result: `Ether Token ` #### Show a loading sign when the name is being fetched `import { TokenProvider, TokenName } from "thirdweb/react"; } /> ; ` #### Fallback to something when the name fails to resolve ` ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function TokenName(__namedParameters: [TokenNameProps](https://portal.thirdweb.com/references/typescript/v5/TokenNameProps)): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` ## TokenSymbol This component fetches then shows the symbol of a token. For ERC20 tokens, it calls the `symbol` function in the ERC20 contract. It inherits all the attributes of a HTML `` component, hence you can style it just like how you would style a normal `` ### Example #### Basic usage `import { TokenProvider, TokenSymbol } from "thirdweb/react"; import { ethereum } from "thirdweb/chains"; ; ` Result: `ETH ` #### Custom symbol resolver By default, TokenSymbol calls the `symbol` function of your contract, however, if your token as an unconventional way to fetch the symbol, you can pass the custom logic to the `symbolResolver` prop. It can either be a string or a function (async) that returns or resolves to a string. `async function getSymbol() { // your own fetching logic return "the symbol"; } ; ` Alternatively, you can pass in a string directly: `; ` #### Format the symbol (capitalize, truncate, etc.) The TokenSymbol component accepts a `formatFn` which takes in a string and outputs a string The function is used to modify the symbol of the token `const concatStr = (str: string):string => str + "Token" ` Result: `Ether Token ` #### Show a loading sign when the symbol is being fetched `import { TokenProvider, TokenSymbol } from "thirdweb/react"; } /> ; ` #### Fallback to something when the symbol fails to resolve ` ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control `; ` ##### Signature `function TokenSymbol( __namedParameters: [TokenSymbolProps](https://portal.thirdweb.com/references/typescript/v5/TokenSymbolProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,symbolResolver : string | (() => string) | (() => Promise),tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` ## WalletIcon This component tries to resolve the icon of a given wallet, then return an image. ### Example #### Basic usage `import { WalletProvider, WalletIcon } from "thirdweb/react"; ; ` Result: An `` component with the src of the icon ` ` #### Show a loading sign while the icon is being loaded `} />; ` #### Fallback to a dummy image if the wallet icon fails to resolve `} />; ` #### Usage with queryOptions WalletIcon uses useQuery() from tanstack query internally. It allows you to pass a custom queryOptions of your choice for more control of the internal fetching logic `; ` ##### Signature `function WalletIcon( __namedParameters: [WalletIconProps](https://portal.thirdweb.com/references/typescript/v5/WalletIconProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ### Returns ##### Return Type `let returnType: null | Element; ` an `` with the src of the wallet icon ## WalletName This component fetches then shows the name of a wallet. It inherits all the attributes of a HTML `` component, hence you can style it just like how you would style a normal `` ### Example #### Basic usage `import { WalletProvider, WalletName } from "thirdweb/react"; ; ` Result: `MetaMask ` #### Show a loading sign when the name is being fetched `import { WalletProvider, WalletName } from "thirdweb/react"; } /> ; ` #### Fallback to something when the name fails to resolve ` Failed to load} /> ; ` #### Custom query options for useQuery This component uses `@tanstack-query` 's useQuery internally. You can use the `queryOptions` prop for more fine-grained control ` @component @beta @wallet ` ##### Signature `function WalletName( __namedParameters: [WalletNameProps](https://portal.thirdweb.com/references/typescript/v5/WalletNameProps), ): null | Element; ` ### Parameters ##### \_\_namedParameters #### Type `let __namedParameters: {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ### Returns ##### Return Type `let returnType: null | Element; ` ## eth\_getBlockByHash Retrieves a block by its hash. ### Example `import { getRpcClient, eth_getBlockByHash } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const block = await eth_getBlockByHash(rpcRequest, { blockHash: "0x...", includeTransactions: true, }); ` ##### Signature `` function eth_getBlockByHash(request: EIP1193RequestFn<[{ Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}` }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}` }]>, params: GetBlockByHashParams) : Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}`; logsBloom: `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: `0x${string}`; number: bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: TIncludeTransactions extends true ? Array<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }> `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for the block retrieval. #### Type `let params: GetBlockByHashParams; ` ### Returns ##### Return Type `` let returnType: Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: `0x${string}`; logsBloom: `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: `0x${string}`; number: bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: TIncludeTransactions extends true ? Array<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: `0x${string}`; blockNumber: bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }> `` A promise that resolves to the retrieved block. ## eth\_getBlockByNumber Retrieves a block by its number or tag from the Ethereum blockchain. ### Example `import { getRpcClient, eth_getBlockByNumber } from "thirdweb/rpc"; const rpcRequest = getRpcClient({ client, chain }); const block = await eth_getBlockByNumber(rpcRequest, { blockNumber: 123456, includeTransactions: true, }); ` ##### Signature `` function eth_getBlockByNumber(request: EIP1193RequestFn<[{ Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}` }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}` }]>, params: GetBlockParameters) : Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: TBlockTag extends "pending" ? null : `0x${string}`; logsBloom: TBlockTag extends "pending" ? null : `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: TBlockTag extends "pending" ? null : `0x${string}`; number: TBlockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: TIncludeTransactions extends true ? Array<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }> `` ### Parameters ##### request The EIP1193 request function. #### Type `` let request: EIP1193RequestFn< [ { Method: "web3_clientVersion"; Parameters?: undefined; ReturnType: string; }, { Method: "web3_sha3"; Parameters: [data: `0x${string}`]; ReturnType: string; }, { Method: "net_listening"; Parameters?: undefined; ReturnType: boolean; }, { Method: "net_peerCount"; Parameters?: undefined; ReturnType: `0x${string}`; }, { Method: "net_version"; Parameters?: undefined; ReturnType: `0x${string}`; }, ] >; `` ##### params The parameters for retrieving the block. #### Type `let params: GetBlockParameters; ` ### Returns ##### Return Type `` let returnType: Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: TBlockTag extends "pending" ? null : `0x${string}`; logsBloom: TBlockTag extends "pending" ? null : `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: TBlockTag extends "pending" ? null : `0x${string}`; number: TBlockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: TIncludeTransactions extends true ? Array<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: TBlockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: TBlockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: TBlockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }> `` A promise that resolves to the requested block. ## viemAdapter Converts thirdweb accounts and contracts to viem wallet clients and contract objects or the other way around. `` let viemAdapter: { contract: { fromViem: (options: FromViemContractOptions) => Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; toViem: { } }; publicClient: { toViem: (options: ToViemPublicClientOptions) => { account: undefined; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; call: (parameters: CallParameters) => Promise; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); createAccessList: (parameters: CreateAccessListParameters) => Promise<{ accessList: AccessList; gasUsed: bigint }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn }, { Method: "eth_uninstallFilter"; Parameters: [filterId: ...]; ReturnType: boolean }]>; type: "block" }>; createContractEventFilter: (args: CreateContractEventFilterParameters) => Promise>; createEventFilter: (args?: CreateEventFilterParameters) => Promise<{[K in string | number | symbol] : Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K]}>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn }, { Method: "eth_uninstallFilter"; Parameters: [filterId: ...]; ReturnType: boolean }]>; type: "transaction" }>; estimateContractGas: (args: EstimateContractGasParameters) => Promise; estimateFeesPerGas: (args?: EstimateFeesPerGasParameters) => Promise>; estimateGas: (args: EstimateGasParameters) => Promise; estimateMaxPriorityFeePerGas: (args?: { chain: null | (chainOverride) }) => Promise; extend: (fn: (client: Client>) => client) => Client)>; getBalance: (args: GetBalanceParameters) => Promise; getBlobBaseFee: () => Promise; getBlock: (args?: GetBlockParameters) => Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: includeTransactions extends true ? Array<({ accessList?: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId?: ...; from: ...; gas: ...; gasPrice: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas?: ...; maxPriorityFeePerGas?: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity?: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas?: ...; maxPriorityFeePerGas?: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }>; getBlockNumber: (args?: GetBlockNumberParameters) => Promise; getBlockTransactionCount: (args?: GetBlockTransactionCountParameters) => Promise; getBytecode: (args: GetCodeParameters) => Promise; getChainId: () => Promise; getCode: (args: GetCodeParameters) => Promise; getContractEvents: (args: GetContractEventsParameters) => Promise>; getEip712Domain: (args: GetEip712DomainParameters) => Promise; getEnsAddress: (args: { blockNumber?: bigint; blockTag?: BlockTag; coinType?: number; gatewayUrls?: Array; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsAvatar: (args: { assetGatewayUrls?: AssetGatewayUrls; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsName: (args: { address: string; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsResolver: (args: { blockNumber?: bigint; blockTag?: BlockTag; name: string; universalResolverAddress?: string }) => Promise; getEnsText: (args: { blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; key: string; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getFeeHistory: (args: GetFeeHistoryParameters) => Promise; getFilterChanges: (args: GetFilterChangesParameters) => Promise>; getFilterLogs: (args: GetFilterLogsParameters) => Promise>; getGasPrice: () => Promise; getLogs: (args?: GetLogsParameters) => Promise>; getProof: (args: GetProofParameters) => Promise; getStorageAt: (args: GetStorageAtParameters) => Promise; getTransaction: (args: GetTransactionParameters) => Promise<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })>; getTransactionConfirmations: (args: GetTransactionConfirmationsParameters) => Promise; getTransactionCount: (args: GetTransactionCountParameters) => Promise; getTransactionReceipt: (args: GetTransactionReceiptParameters) => Promise; key: string; multicall: (args: MulticallParameters) => Promise>; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; readContract: (args: ReadContractParameters) => Promise>; request: EIP1193RequestFn; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; simulate: (args: SimulateBlocksParameters) => Promise>; simulateBlocks: (args: SimulateBlocksParameters) => Promise>; simulateCalls: (args: SimulateCallsParameters) => Promise>; simulateContract: (args: SimulateContractParameters) => Promise>; transport: (TransportConfig) & (Record); type: string; uid: string; uninstallFilter: (args: UninstallFilterParameters) => Promise; verifyMessage: (args: { address: string; blockNumber?: bigint; blockTag?: BlockTag; factory?: string; factoryData?: `0x${string}`; message: SignableMessage; signature: (`0x${string}`) | (ByteArray) | (Signature); universalSignatureVerifierAddress?: string }) => Promise; verifySiweMessage: (args: { address?: string; blockNumber?: bigint; blockTag?: BlockTag; domain?: string; message: string; nonce?: string; scheme?: string; signature: `0x${string}`; time?: Date }) => Promise; verifyTypedData: (args: VerifyTypedDataParameters) => Promise; waitForTransactionReceipt: (args: WaitForTransactionReceiptParameters) => Promise; watchBlockNumber: (args: WatchBlockNumberParameters) => WatchBlockNumberReturnType; watchBlocks: (args: WatchBlocksParameters) => WatchBlocksReturnType; watchContractEvent: (args: WatchContractEventParameters) => WatchContractEventReturnType; watchEvent: (args: WatchEventParameters) => WatchEventReturnType; watchPendingTransactions: (args: WatchPendingTransactionsParameters) => WatchPendingTransactionsReturnType } }; wallet: { fromViem: (options: { walletClient: { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${...}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<..., ...>) & (... extends ... ? ... : ...)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise, (GetTransactionType<..., ...> extends "eip1559" ? `0x02${...}` : never) | (GetTransactionType<..., ...> extends "eip2930" ? `0x01${...}` : never) | (GetTransactionType<..., ...> extends "eip4844" ? `0x03${...}` : never) | (GetTransactionType<..., ...> extends "eip7702" ? `0x04${...}` : never) | (GetTransactionType<..., ...> extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } }) => Wallet; toViem: (options: WalletToViemOptions) => { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise : never)>, (GetTransactionType extends "eip1559" ? `0x02${string}` : never) | (GetTransactionType extends "eip2930" ? `0x01${string}` : never) | (GetTransactionType extends "eip4844" ? `0x03${string}` : never) | (GetTransactionType extends "eip7702" ? `0x04${string}` : never) | (GetTransactionType extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } }; walletClient: { fromViem: (options: { walletClient: { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${...}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<..., ...>) & (... extends ... ? ... : ...)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise, (GetTransactionType<..., ...> extends "eip1559" ? `0x02${...}` : never) | (GetTransactionType<..., ...> extends "eip2930" ? `0x01${...}` : never) | (GetTransactionType<..., ...> extends "eip4844" ? `0x03${...}` : never) | (GetTransactionType<..., ...> extends "eip7702" ? `0x04${...}` : never) | (GetTransactionType<..., ...> extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } }) => Account; toViem: (options: ToViemWalletClientOptions) => { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise : never)>, (GetTransactionType extends "eip1559" ? `0x02${string}` : never) | (GetTransactionType extends "eip2930" ? `0x01${string}` : never) | (GetTransactionType extends "eip4844" ? `0x03${string}` : never) | (GetTransactionType extends "eip7702" ? `0x04${string}` : never) | (GetTransactionType extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } } } `` ##### contract Creates a ThirdwebContract from a Viem contract or the other way around. `` type contract = { fromViem: ( options: FromViemContractOptions, ) => Readonly<[ContractOptions](https://portal.thirdweb.com/references/typescript/v5/ContractOptions)>; toViem: {}; }; `` ### Example #### fromViem `import { viemAdapter } from "thirdweb/adapters/viem"; const contract = viemAdapter.contract.fromViem({ viemContract: viemContract, chain: ethereum, client, }); ` #### toViem `import { viemAdapter } from "thirdweb/adapters"; const viemContract = await viemAdapter.contract.toViem({ thirdwebContract, }); ` ##### publicClient Converts options to a Viem public client. `` type publicClient = { toViem: (options: ToViemPublicClientOptions) => { account: undefined; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; call: (parameters: CallParameters) => Promise; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); createAccessList: (parameters: CreateAccessListParameters) => Promise<{ accessList: AccessList; gasUsed: bigint }>; createBlockFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn }, { Method: "eth_uninstallFilter"; Parameters: [filterId: ...]; ReturnType: boolean }]>; type: "block" }>; createContractEventFilter: (args: CreateContractEventFilterParameters) => Promise>; createEventFilter: (args?: CreateEventFilterParameters) => Promise<{[K in string | number | symbol] : Filter<"event", abiEvents, _EventName, _Args, strict, fromBlock, toBlock>[K]}>; createPendingTransactionFilter: () => Promise<{ id: `0x${string}`; request: EIP1193RequestFn }, { Method: "eth_uninstallFilter"; Parameters: [filterId: ...]; ReturnType: boolean }]>; type: "transaction" }>; estimateContractGas: (args: EstimateContractGasParameters) => Promise; estimateFeesPerGas: (args?: EstimateFeesPerGasParameters) => Promise>; estimateGas: (args: EstimateGasParameters) => Promise; estimateMaxPriorityFeePerGas: (args?: { chain: null | (chainOverride) }) => Promise; extend: (fn: (client: Client>) => client) => Client)>; getBalance: (args: GetBalanceParameters) => Promise; getBlobBaseFee: () => Promise; getBlock: (args?: GetBlockParameters) => Promise<{ baseFeePerGas: null | bigint; blobGasUsed: bigint; difficulty: bigint; excessBlobGas: bigint; extraData: `0x${string}`; gasLimit: bigint; gasUsed: bigint; hash: blockTag extends "pending" ? null : `0x${string}`; logsBloom: blockTag extends "pending" ? null : `0x${string}`; miner: string; mixHash: `0x${string}`; nonce: blockTag extends "pending" ? null : `0x${string}`; number: blockTag extends "pending" ? null : bigint; parentBeaconBlockRoot?: `0x${string}`; parentHash: `0x${string}`; receiptsRoot: `0x${string}`; sealFields: Array<`0x${string}`>; sha3Uncles: `0x${string}`; size: bigint; stateRoot: `0x${string}`; timestamp: bigint; totalDifficulty: null | bigint; transactions: includeTransactions extends true ? Array<({ accessList?: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId?: ...; from: ...; gas: ...; gasPrice: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas?: ...; maxPriorityFeePerGas?: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity?: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas?: ...; maxPriorityFeePerGas?: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList?: ...; blobVersionedHashes: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... }) | ({ accessList: ...; authorizationList: ...; blobVersionedHashes?: ...; blockHash: ...; blockNumber: ...; chainId: ...; from: ...; gas: ...; gasPrice?: ...; hash: ...; input: ...; maxFeePerBlobGas?: ...; maxFeePerGas: ...; maxPriorityFeePerGas: ...; nonce: ...; r: ...; s: ...; to: ...; transactionIndex: ...; type: ...; typeHex: ...; v: ...; value: ...; yParity: ... })> : Array<`0x${string}`>; transactionsRoot: `0x${string}`; uncles: Array<`0x${string}`>; withdrawals?: Array; withdrawalsRoot?: `0x${string}` }>; getBlockNumber: (args?: GetBlockNumberParameters) => Promise; getBlockTransactionCount: (args?: GetBlockTransactionCountParameters) => Promise; getBytecode: (args: GetCodeParameters) => Promise; getChainId: () => Promise; getCode: (args: GetCodeParameters) => Promise; getContractEvents: (args: GetContractEventsParameters) => Promise>; getEip712Domain: (args: GetEip712DomainParameters) => Promise; getEnsAddress: (args: { blockNumber?: bigint; blockTag?: BlockTag; coinType?: number; gatewayUrls?: Array; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsAvatar: (args: { assetGatewayUrls?: AssetGatewayUrls; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsName: (args: { address: string; blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; strict?: boolean; universalResolverAddress?: string }) => Promise; getEnsResolver: (args: { blockNumber?: bigint; blockTag?: BlockTag; name: string; universalResolverAddress?: string }) => Promise; getEnsText: (args: { blockNumber?: bigint; blockTag?: BlockTag; gatewayUrls?: Array; key: string; name: string; strict?: boolean; universalResolverAddress?: string }) => Promise; getFeeHistory: (args: GetFeeHistoryParameters) => Promise; getFilterChanges: (args: GetFilterChangesParameters) => Promise>; getFilterLogs: (args: GetFilterLogsParameters) => Promise>; getGasPrice: () => Promise; getLogs: (args?: GetLogsParameters) => Promise>; getProof: (args: GetProofParameters) => Promise; getStorageAt: (args: GetStorageAtParameters) => Promise; getTransaction: (args: GetTransactionParameters) => Promise<({ accessList?: undefined; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId?: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "legacy"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity?: undefined }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice: bigint; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas?: undefined; maxPriorityFeePerGas?: undefined; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip2930"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip1559"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList?: undefined; blobVersionedHashes: readonly Array<`0x${string}`>; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip4844"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number }) | ({ accessList: AccessList; authorizationList: SignedAuthorizationList; blobVersionedHashes?: undefined; blockHash: blockTag extends "pending" ? true : false extends true ? null : `0x${string}`; blockNumber: blockTag extends "pending" ? true : false extends true ? null : bigint; chainId: number; from: string; gas: bigint; gasPrice?: undefined; hash: `0x${string}`; input: `0x${string}`; maxFeePerBlobGas?: undefined; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; nonce: number; r: `0x${string}`; s: `0x${string}`; to: null | string; transactionIndex: blockTag extends "pending" ? true : false extends true ? null : number; type: "eip7702"; typeHex: null | (`0x${string}`); v: bigint; value: bigint; yParity: number })>; getTransactionConfirmations: (args: GetTransactionConfirmationsParameters) => Promise; getTransactionCount: (args: GetTransactionCountParameters) => Promise; getTransactionReceipt: (args: GetTransactionReceiptParameters) => Promise; key: string; multicall: (args: MulticallParameters) => Promise>; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; readContract: (args: ReadContractParameters) => Promise>; request: EIP1193RequestFn; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; simulate: (args: SimulateBlocksParameters) => Promise>; simulateBlocks: (args: SimulateBlocksParameters) => Promise>; simulateCalls: (args: SimulateCallsParameters) => Promise>; simulateContract: (args: SimulateContractParameters) => Promise>; transport: (TransportConfig) & (Record); type: string; uid: string; uninstallFilter: (args: UninstallFilterParameters) => Promise; verifyMessage: (args: { address: string; blockNumber?: bigint; blockTag?: BlockTag; factory?: string; factoryData?: `0x${string}`; message: SignableMessage; signature: (`0x${string}`) | (ByteArray) | (Signature); universalSignatureVerifierAddress?: string }) => Promise; verifySiweMessage: (args: { address?: string; blockNumber?: bigint; blockTag?: BlockTag; domain?: string; message: string; nonce?: string; scheme?: string; signature: `0x${string}`; time?: Date }) => Promise; verifyTypedData: (args: VerifyTypedDataParameters) => Promise; waitForTransactionReceipt: (args: WaitForTransactionReceiptParameters) => Promise; watchBlockNumber: (args: WatchBlockNumberParameters) => WatchBlockNumberReturnType; watchBlocks: (args: WatchBlocksParameters) => WatchBlocksReturnType; watchContractEvent: (args: WatchContractEventParameters) => WatchContractEventReturnType; watchEvent: (args: WatchEventParameters) => WatchEventReturnType; watchPendingTransactions: (args: WatchPendingTransactionsParameters) => WatchPendingTransactionsReturnType } } `` ### Example `import { viemAdapter } from "thirdweb/adapters/viem"; const publicClient = viemAdapter.publicClient.toViem({ chain: ethereum, client, }); ` ##### wallet Converts a thirdweb account to a Viem Wallet client or the other way around. `` type wallet = { fromViem: (options: { walletClient: { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${...}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<..., ...>) & (... extends ... ? ... : ...)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise, (GetTransactionType<..., ...> extends "eip1559" ? `0x02${...}` : never) | (GetTransactionType<..., ...> extends "eip2930" ? `0x01${...}` : never) | (GetTransactionType<..., ...> extends "eip4844" ? `0x03${...}` : never) | (GetTransactionType<..., ...> extends "eip7702" ? `0x04${...}` : never) | (GetTransactionType<..., ...> extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } }) => [Wallet](https://portal.thirdweb.com/references/typescript/v5/Wallet); toViem: (options: WalletToViemOptions) => { account: undefined | (Account); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise : never)>, (GetTransactionType extends "eip1559" ? `0x02${string}` : never) | (GetTransactionType extends "eip2930" ? `0x01${string}` : never) | (GetTransactionType extends "eip4844" ? `0x03${string}` : never) | (GetTransactionType extends "eip7702" ? `0x04${string}` : never) | (GetTransactionType extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } } `` ### Example #### toViem `import { viemAdapter } from "thirdweb/adapters/viem"; const walletClient = viemAdapter.wallet.toViem({ wallet, client, chain: ethereum, }); ` #### fromViem `import { viemAdapter } from "thirdweb/adapters"; const wallet = viemAdapter.wallet.fromViem({ walletClient, }); ` ##### walletClient Deprecated use viemAdapter.wallet instead Converts a thirdweb account to a Viem Wallet client or the other way around. `` type walletClient = { fromViem: (options: { walletClient: { account: undefined | ([Account](https://portal.thirdweb.com/references/typescript/v5/Account)); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${...}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<..., ...>) & (... extends ... ? ... : ...)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise, (GetTransactionType<..., ...> extends "eip1559" ? `0x02${...}` : never) | (GetTransactionType<..., ...> extends "eip2930" ? `0x01${...}` : never) | (GetTransactionType<..., ...> extends "eip4844" ? `0x03${...}` : never) | (GetTransactionType<..., ...> extends "eip7702" ? `0x04${...}` : never) | (GetTransactionType<..., ...> extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } }) => [Account](https://portal.thirdweb.com/references/typescript/v5/Account); toViem: (options: ToViemWalletClientOptions) => { account: undefined | ([Account](https://portal.thirdweb.com/references/typescript/v5/Account)); addChain: (args: AddChainParameters) => Promise; batch?: { multicall?: boolean | ({ batchSize?: number; wait?: number }) }; cacheTime: number; ccipRead?: false | ({ request?: (parameters: CcipRequestParameters) => Promise<`0x${string}`> }); chain: undefined | (Chain); deployContract: (args: DeployContractParameters) => Promise<`0x${string}`>; extend: (fn: (client: Client>) => client) => Client)>; getAddresses: () => Promise; getChainId: () => Promise; getPermissions: () => Promise; key: string; name: string; pollingInterval: number; prepareTransactionRequest: (args: PrepareTransactionRequestParameters) => Promise<{[K in string | number | symbol] : (UnionRequiredBy<(...) & (...), ParameterTypeToParameters<...>>) & (unknown extends ...[...] ? { } : Pick<..., ...>)[K]}>; request: EIP1193RequestFn; requestAddresses: () => Promise; requestPermissions: (args: { eth_accounts: Record }) => Promise; sendRawTransaction: (args: SendRawTransactionParameters) => Promise<`0x${string}`>; sendTransaction: (args: SendTransactionParameters) => Promise<`0x${string}`>; signMessage: (args: SignMessageParameters) => Promise<`0x${string}`>; signTransaction: (args: SignTransactionParameters) => Promise : never)>, (GetTransactionType extends "eip1559" ? `0x02${string}` : never) | (GetTransactionType extends "eip2930" ? `0x01${string}` : never) | (GetTransactionType extends "eip4844" ? `0x03${string}` : never) | (GetTransactionType extends "eip7702" ? `0x04${string}` : never) | (GetTransactionType extends "legacy" ? TransactionSerializedLegacy : never)>>; signTypedData: (args: SignTypedDataParameters) => Promise<`0x${string}`>; switchChain: (args: SwitchChainParameters) => Promise; transport: (TransportConfig) & (Record); type: string; uid: string; watchAsset: (args: WatchAssetParams) => Promise; writeContract: (args: WriteContractParameters) => Promise<`0x${string}`> } } `` ### Example #### toViem `import { viemAdapter } from "thirdweb/adapters/viem"; const walletClient = viemAdapter.walletClient.toViem({ account, client, chain: ethereum, }); ` #### fromViem `import { viemAdapter } from "thirdweb/adapters"; const account = viemAdapter.walletClient.fromViem({ walletClient, }); ` ## Core Functions ##### Extensions ##### EIP1193 ##### DEPLOY ##### MARKETPLACE ##### AIRDROP ##### COMMON ##### ENS ##### ERC1155 ##### ERC721 ##### ERC1271 ##### ERC20 ##### ERC4337 ##### ERC4626 ##### FARCASTER ##### LENS ##### MULTICALL3 ##### PACK ##### PERMISSIONS ##### SPLIT ##### THIRDWEB ##### thirdweb ##### UNISWAP ##### UNSTOPPABLE-DOMAINS ##### VOTE ##### MODULES ##### EIP5792 ##### Modules ##### Common ##### BatchMetadataERC1155 ##### BatchMetadataERC721 ##### ClaimableERC1155 ##### ClaimableERC20 ##### ClaimableERC721 ##### MintableERC1155 ##### MintableERC20 ##### MintableERC721 ##### OpenEditionMetadataERC721 ##### RoyaltyERC1155 ##### RoyaltyERC721 ##### SequentialTokenIdERC1155 ##### TransferableERC1155 ##### TransferableERC20 ##### TransferableERC721 ##### Client ##### Wallets ##### Wallet Connection ##### Wallet Utilities ##### Chain ##### Contract ##### Transactions ##### Nebula ##### Social API ##### Auth ##### NFT ##### Buy Crypto ##### Tokens ##### Storage ##### RPC ##### Theme ##### Utils ##### Miscellaneous ## Supported Wallets ### thirdweb first-party wallets [](https://portal.thirdweb.com/references/typescript/v5/smartWallet)![](/_next/static/media/smartwallet.eaa43e0b.svg) #### Smart Wallet [](https://portal.thirdweb.com/references/typescript/v5/inAppWallet)![](/_next/static/media/embeddedwallet.3f910150.svg) #### In App Wallet [](https://portal.thirdweb.com/references/typescript/v5/ecosystemWallet)![](/_next/static/media/embeddedwallet.3f910150.svg) #### Ecosystem Wallet ### Other wallets | Wallet | ID | | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------- | | [MetaMask](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.metamask) | "io.metamask" | | [Trust Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.trustwallet.app) | "com.trustwallet.app" | | [OKX Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.okex.wallet) | "com.okex.wallet" | | [Bitget Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitget.web3) | "com.bitget.web3" | | [Binance Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.binance) | "com.binance" | | [Uniswap Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.uniswap) | "org.uniswap" | | [SafePal](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.safepal) | "com.safepal" | | [Rainbow](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.rainbow) | "me.rainbow" | | [Bybit Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bybit) | "com.bybit" | | [TokenPocket](https://portal.thirdweb.com/typescript/v5/supported-wallets/pro.tokenpocket) | "pro.tokenpocket" | | [Ledger Live](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ledger) | "com.ledger" | | [Timeless X](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.timelesswallet) | "xyz.timelesswallet" | | [Safe](https://portal.thirdweb.com/typescript/v5/supported-wallets/global.safe) | "global.safe" | | [Zerion](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.zerion.wallet) | "io.zerion.wallet" | | [Robinhood Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.robinhood.wallet) | "com.robinhood.wallet" | | [1inch Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.1inch.wallet) | "io.1inch.wallet" | | [Crypto.com Onchain](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.crypto.wallet) | "com.crypto.wallet" | | [Exodus](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.exodus) | "com.exodus" | | [Argent](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.argent) | "xyz.argent" | | [imToken](https://portal.thirdweb.com/typescript/v5/supported-wallets/im.token) | "im.token" | | [Blockchain.com](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.blockchain) | "com.blockchain" | | [Magic Eden](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.magiceden.wallet) | "io.magiceden.wallet" | | [Kraken Wallet ](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.kraken) | "com.kraken" | | [Backpack](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.backpack) | "app.backpack" | | [Zengo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.zengo) | "com.zengo" | | [MEW wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.mewwallet) | "com.mewwallet" | | [Phantom](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.phantom) | "app.phantom" | | [Fireblocks](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.fireblocks) | "com.fireblocks" | | [MathWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.mathwallet) | "org.mathwallet" | | [AlphaWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.alphawallet) | "com.alphawallet" | | [Ronin Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.roninchain.wallet) | "com.roninchain.wallet" | | [Unstoppable Domains](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.unstoppabledomains) | "com.unstoppabledomains" | | [KEYRING PRO](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.keyring) | "app.keyring" | | [Frontier](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.frontier.wallet) | "xyz.frontier.wallet" | | [Omni](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.omni) | "app.omni" | | [Obvious](https://portal.thirdweb.com/typescript/v5/supported-wallets/technology.obvious) | "technology.obvious" | | [Ambire Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ambire) | "com.ambire" | | [Bridge Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.mtpelerin) | "com.mtpelerin" | | [Internet Money Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.internetmoney) | "io.internetmoney" | | [NOW Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.walletnow) | "app.walletnow" | | [Bitcoin.com Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitcoin) | "com.bitcoin" | | [αU wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.alpha-u.wallet.web) | "io.alpha-u.wallet.web" | | [Coin98 Super Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coin98) | "com.coin98" | | [ABC Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.myabcwallet) | "io.myabcwallet" | | [Arculus Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.arculus) | "co.arculus" | | [Opera Crypto Browser](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.opera) | "com.opera" | | [Chain](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.chain) | "com.chain" | | [Huddln](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.huddln) | "io.huddln" | | [Verso](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.get-verso) | "com.get-verso" | | [HaHa](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.haha) | "me.haha" | | [Modular Wallet Prod](https://portal.thirdweb.com/typescript/v5/supported-wallets/pk.modular) | "pk.modular" | | [Kelp](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.kelp) | "org.kelp" | | [Cling Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.clingon) | "io.clingon" | | [Broearn Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.broearn) | "com.broearn" | | [Coinomi](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coinomi) | "com.coinomi" | | [Ripio Portal](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ripio) | "com.ripio" | | [Sabay Wallet App](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.sabay.wallet) | "com.sabay.wallet" | | [Tokoin \| My-T Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.tokoin) | "io.tokoin" | | [Fncy Mobile Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/world.fncy) | "world.fncy" | | [Copiosa](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.copiosa) | "io.copiosa" | | [Libera](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.liberawallet) | "com.liberawallet" | | [Certhis](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.certhis) | "io.certhis" | | [Burrito](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.burritowallet) | "com.burritowallet" | | [Ancrypto](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ancrypto) | "io.ancrypto" | | [CVL Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.cvl) | "network.cvl" | | [Cypher Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.cypherhq) | "io.cypherhq" | | [Status](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.status) | "app.status" | | [Enjin Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.enjin) | "io.enjin" | | [Essentials](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.trinity-tech) | "io.trinity-tech" | | [Everspace](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.everspace) | "app.everspace" | | [Kriptomat](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.kriptomat) | "io.kriptomat" | | [Oxalus Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.oxalus) | "io.oxalus" | | [Theta Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.thetatoken) | "org.thetatoken" | | [Leap Cosmos Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.leapwallet) | "io.leapwallet" | | [ISLAMIwallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.islamicoin) | "finance.islamicoin" | | [COCA Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.coca) | "xyz.coca" | | [Monarch Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.monarchwallet) | "com.monarchwallet" | | [FILWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.filwallet) | "co.filwallet" | | [Valora](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.valoraapp) | "com.valoraapp" | | [CoinCircle](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coincircle) | "com.coincircle" | | [Snowball](https://portal.thirdweb.com/typescript/v5/supported-wallets/money.snowball) | "money.snowball" | | [ParaSwap Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.paraswap) | "io.paraswap" | | [Sahal Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.mrhb) | "network.mrhb" | | [ApolloX](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.apollox) | "com.apollox" | | [Enno Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ennowallet) | "com.ennowallet" | | [Loopring](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.loopring.wallet) | "io.loopring.wallet" | | [BeeWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bee) | "com.bee" | | [LocalTrade Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/cc.localtrade.lab) | "cc.localtrade.lab" | | [Xcapit](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.xcapit) | "com.xcapit" | | [Safematrix](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.safematrix) | "io.safematrix" | | [Neon Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.neonwallet) | "com.neonwallet" | | [Sequence Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.sequence) | "xyz.sequence" | | [Linen](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.linen) | "app.linen" | | [Nabox](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.nabox) | "io.nabox" | | [Spatium](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.spatium) | "net.spatium" | | [Cryptnox Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.cryptnox) | "com.cryptnox" | | [ID Pocket](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.rktechworks) | "com.rktechworks" | | [Assure](https://portal.thirdweb.com/typescript/v5/supported-wallets/pro.assure) | "pro.assure" | | [Flooz](https://portal.thirdweb.com/typescript/v5/supported-wallets/trade.flooz.wallet) | "trade.flooz.wallet" | | [Keplr](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.keplr) | "app.keplr" | | [Crossmint](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.crossmint) | "com.crossmint" | | [pier](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.pierwallet) | "com.pierwallet" | | [Core](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.core) | "app.core" | | [Keeper](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.keeper-wallet) | "app.keeper-wallet" | | [D'CENT Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.dcentwallet) | "com.dcentwallet" | | [Paper](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.withpaper) | "com.withpaper" | | [Klever Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.klever) | "finance.klever" | | [Edge Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.edge) | "app.edge" | | [NeftiWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.neftipedia) | "com.neftipedia" | | [GoldBit](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.goldbit) | "io.goldbit" | | [Coingrig](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coingrig) | "com.coingrig" | | [XFUN Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.xfun) | "io.xfun" | | [RiceWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ricewallet) | "io.ricewallet" | | [Ancrypto Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.antiersolutions) | "com.antiersolutions" | | [Okse Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.okse) | "io.okse" | | [Aktionariat](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.aktionariat) | "com.aktionariat" | | [iToken Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.itoken) | "com.itoken" | | [Zelus](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.zelus) | "io.zelus" | | [Card Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.cardstack) | "com.cardstack" | | [PayBolt](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.paybolt) | "com.paybolt" | | [Arianee Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.arianee) | "org.arianee" | | [Slavi Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.slavi) | "io.slavi" | | [Plasma Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.plasma-wallet) | "com.plasma-wallet" | | [Defiant](https://portal.thirdweb.com/typescript/v5/supported-wallets/tech.defiantapp) | "tech.defiantapp" | | [Avacus](https://portal.thirdweb.com/typescript/v5/supported-wallets/cc.avacus) | "cc.avacus" | | [ByteBank](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.bytebank) | "org.bytebank" | | [CoolWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coolbitx.cwsapp) | "com.coolbitx.cwsapp" | | [Opto Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.optowallet) | "com.optowallet" | | [TK Finance](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.trustkeys) | "network.trustkeys" | | [Bee Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.beewallet) | "app.beewallet" | | [MDAO Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ttmwallet) | "io.ttmwallet" | | [PLTwallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.pltwallet) | "io.pltwallet" | | [helix id](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.helixid) | "io.helixid" | | [AirGap Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/it.airgap) | "it.airgap" | | [Qubic Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.qubic.wallet) | "app.qubic.wallet" | | [Holdstation Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.holdstation) | "com.holdstation" | | [Saakuru All-in-One crypto App](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.saakuru.app) | "com.saakuru.app" | | [3S Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.3swallet) | "com.3swallet" | | [Payperless](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.payperless) | "com.payperless" | | [Minerva Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/digital.minerva) | "digital.minerva" | | [Volt: DeFi](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.voltage) | "finance.voltage" | | [Lif3 Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.lif3) | "com.lif3" | | [Shinobi-Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.shinobi-wallet) | "net.shinobi-wallet" | | [KryptoGO Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.kryptogo) | "com.kryptogo" | | [Feral File](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.feralfile.app) | "com.feralfile.app" | | [Bifrost Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bifrostwallet) | "com.bifrostwallet" | | [Nufinetes](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.nufinetes) | "com.nufinetes" | | [Wallet 3](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.wallet3) | "io.wallet3" | | [Abra Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.abra) | "com.abra" | | [iMe](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.imem) | "app.imem" | | [PREMA Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.premanft) | "com.premanft" | | [OneKey](https://portal.thirdweb.com/typescript/v5/supported-wallets/so.onekey.app.wallet) | "so.onekey.app.wallet" | | [Slingshot Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.slingshot) | "finance.slingshot" | | [Kriptonio](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.kriptonio) | "com.kriptonio" | | [Ctrl Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.ctrl) | "xyz.ctrl" | | [Streakk Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.streakk) | "io.streakk" | | [SaitaPro](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.saitamatoken) | "com.saitamatoken" | | [Flow Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.flowfoundation.wallet) | "com.flowfoundation.wallet" | | [Hippo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.hippowallet) | "io.hippowallet" | | [Cosmostation](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.cosmostation) | "io.cosmostation" | | [Bitizen](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.bitizen) | "org.bitizen" | | [Blocto](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.blocto) | "io.blocto" | | [HUMBL WALLET](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.humbl) | "com.humbl" | | [PassPay Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.passpay) | "io.passpay" | | [Ultimate](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.ultimate) | "app.ultimate" | | [Me Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.astrox) | "me.astrox" | | [THORWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.thorwallet) | "org.thorwallet" | | [Fizz](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.fizzwallet) | "app.fizzwallet" | | [Stickey Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.stickey) | "app.stickey" | | [Klip](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.klipwallet) | "com.klipwallet" | | [CoinStats](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.coinstats) | "app.coinstats" | | [LikerLand App](https://portal.thirdweb.com/typescript/v5/supported-wallets/land.liker) | "land.liker" | | [Krystal](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.krystal) | "app.krystal" | | [Pillar](https://portal.thirdweb.com/typescript/v5/supported-wallets/fi.pillar) | "fi.pillar" | | [HARTi Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.harti) | "io.harti" | | [Stasis Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.stasis) | "net.stasis" | | [Nova Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.novawallet) | "io.novawallet" | | [DTTD](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.dttd) | "io.dttd" | | [FoxWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.foxwallet) | "com.foxwallet" | | [HAQQ Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.haqq) | "network.haqq" | | [tomi Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.tomi) | "com.tomi" | | [StrikeX Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.tradestrike) | "io.tradestrike" | | [SubWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.subwallet) | "app.subwallet" | | [Okto](https://portal.thirdweb.com/typescript/v5/supported-wallets/tech.okto) | "tech.okto" | | [Catecoin Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.catecoin) | "app.catecoin" | | [UKISS Hub](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ukiss) | "io.ukiss" | | [Tellaw Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.tellaw) | "com.tellaw" | | [Tangem Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.tangem) | "com.tangem" | | [Callback](https://portal.thirdweb.com/typescript/v5/supported-wallets/is.callback) | "is.callback" | | [SA ASSISTANT](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.summonersarena) | "io.summonersarena" | | [Xellar](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.xellar) | "co.xellar" | | [Talken Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.talken) | "io.talken" | | [U2U Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.uniultra.wallet) | "xyz.uniultra.wallet" | | [OzoneWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ozonewallet) | "io.ozonewallet" | | [Tidus Wallet ](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.tiduswallet) | "com.tiduswallet" | | [Impact Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/world.ixo) | "world.ixo" | | [Zelcore](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.zelcore) | "io.zelcore" | | [DOSI Vault](https://portal.thirdweb.com/typescript/v5/supported-wallets/world.dosi.vault) | "world.dosi.vault" | | [WOW EARN](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ullapay) | "com.ullapay" | | [ELLIPAL](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ellipal) | "com.ellipal" | | [Unstoppable Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/money.unstoppable) | "money.unstoppable" | | [Aurora Pass](https://portal.thirdweb.com/typescript/v5/supported-wallets/dev.auroracloud) | "dev.auroracloud" | | [Bitverse](https://portal.thirdweb.com/typescript/v5/supported-wallets/zone.bitverse) | "zone.bitverse" | | [Konio](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.konio) | "io.konio" | | [GateWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.gateweb3) | "net.gateweb3" | | [UTORG](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.utorg) | "app.utorg" | | [CoinWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coinsdo) | "com.coinsdo" | | [Ammer Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.ammer) | "app.ammer" | | [Binance.US](https://portal.thirdweb.com/typescript/v5/supported-wallets/us.binance) | "us.binance" | | [MUZA](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.muza) | "co.muza" | | [FxWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.fxwallet) | "com.fxwallet" | | [RYIPAY](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.ryipay) | "app.ryipay" | | [MetaWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.dota168) | "org.dota168" | | [Altme](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.altme) | "io.altme" | | [Bitpie](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitpie) | "com.bitpie" | | [MOONSTAKE](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.moonstake) | "io.moonstake" | | [IndiGG](https://portal.thirdweb.com/typescript/v5/supported-wallets/gg.indi) | "gg.indi" | | [Yuse Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.yusetoken) | "io.yusetoken" | | [Coininn Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coininn) | "com.coininn" | | [f(x)Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.functionx) | "io.functionx" | | [pockie](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.pockie) | "io.pockie" | | [AmazeWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.amazewallet) | "com.amazewallet" | | [Pali Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.paliwallet) | "com.paliwallet" | | [EASY](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.easy) | "me.easy" | | [SuperWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/live.superex) | "live.superex" | | [SecuX](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.secuxtech) | "com.secuxtech" | | [DIDWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.didwallet) | "io.didwallet" | | [Halo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/social.halo) | "social.halo" | | [Sinohope](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.sinohope) | "com.sinohope" | | [Ballet Crypto](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ballet) | "com.ballet" | | [OPZ Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.opz) | "com.opz" | | [Fizen Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.fizen) | "io.fizen" | | [Kresus SuperApp](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.kresus) | "com.kresus" | | [midoin](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.midoin) | "com.midoin" | | [ONTO](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.onto) | "app.onto" | | [Oasys Passport](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.oasys-wallet) | "com.oasys-wallet" | | [GoodDollar](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.gooddollar) | "org.gooddollar" | | [Competence.id](https://portal.thirdweb.com/typescript/v5/supported-wallets/id.competence) | "id.competence" | | [Spot On Chain App](https://portal.thirdweb.com/typescript/v5/supported-wallets/ai.spotonchain.platform) | "ai.spotonchain.platform" | | [DGG Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.dgg) | "network.dgg" | | [BeanBag](https://portal.thirdweb.com/typescript/v5/supported-wallets/llc.besc) | "llc.besc" | | [Gamic](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.gamic) | "app.gamic" | | [Smart.Baby](https://portal.thirdweb.com/typescript/v5/supported-wallets/baby.smart) | "baby.smart" | | [Gridlock Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.gridlock) | "network.gridlock" | | [Zeal](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.zeal) | "app.zeal" | | [IApp](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ivirse) | "com.ivirse" | | [DS Security SA](https://portal.thirdweb.com/typescript/v5/supported-wallets/ch.dssecurity) | "ch.dssecurity" | | [Concordium](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.concordium) | "com.concordium" | | [Ape Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.zkape) | "io.zkape" | | [thirdweb](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.thirdweb) | "com.thirdweb" | | [Pitaka](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.pitaka) | "io.pitaka" | | [Trustee Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.trusteeglobal) | "com.trusteeglobal" | | [rss wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.mugambo) | "org.mugambo" | | [Dropp](https://portal.thirdweb.com/typescript/v5/supported-wallets/cc.dropp) | "cc.dropp" | | [Roam](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.roam.wallet) | "xyz.roam.wallet" | | [Qoin Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/world.qoin) | "world.qoin" | | [MELDapp](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.meld.app) | "com.meld.app" | | [Best Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bestwallet) | "com.bestwallet" | | [HyperPay](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.hyperpay) | "io.hyperpay" | | [Xucre](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.xucre) | "io.xucre" | | [HERE Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.herewallet) | "app.herewallet" | | [Cake Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.cakewallet) | "com.cakewallet" | | [una Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.unagi.unawallet) | "io.unagi.unawallet" | | [Ethos Self-Custody Vault](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ethos) | "io.ethos" | | [Plus Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.pluswallet) | "app.pluswallet" | | [AT.Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.authentrend) | "com.authentrend" | | [Plena-App](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.plena) | "finance.plena" | | [WemixWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.wemix) | "com.wemix" | | [Gem Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.gemwallet) | "com.gemwallet" | | [Caesium](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.caesiumlab) | "com.caesiumlab" | | [FINTOKEN](https://portal.thirdweb.com/typescript/v5/supported-wallets/pro.fintoken) | "pro.fintoken" | | [PEAKDEFI](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.peakdefi) | "com.peakdefi" | | [Nodle](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.nodle) | "com.nodle" | | [Cryptokara](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.cryptokara) | "com.cryptokara" | | [poolswallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.poolsmobility.wallet) | "com.poolsmobility.wallet" | | [VeWorld Mobile](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.veworld) | "com.veworld" | | [AZCoiner](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.azcoiner) | "com.azcoiner" | | [Jambo](https://portal.thirdweb.com/typescript/v5/supported-wallets/technology.jambo) | "technology.jambo" | | [UIIC](https://portal.thirdweb.com/typescript/v5/supported-wallets/vc.uincubator.api) | "vc.uincubator.api" | | [M1NTY](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.m1nty) | "app.m1nty" | | [Noone Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.noone) | "io.noone" | | [Bitso Web3 Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitso) | "com.bitso" | | [Puzzle Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/online.puzzle) | "online.puzzle" | | [BlackFort Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.blackfort) | "network.blackfort" | | [Armana Portal](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.armana.portal) | "io.armana.portal" | | [BharatBox App](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.bharatbox) | "io.bharatbox" | | [Blockaura](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.greengloryglobal) | "com.greengloryglobal" | | [X9Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.x9wallet) | "com.x9wallet" | | [Mirai App](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.miraiapp) | "io.miraiapp" | | [Kigo](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.kigo) | "io.kigo" | | [Cogni ](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.getcogni) | "com.getcogni" | | [Fastex Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.fastex.wallet) | "com.fastex.wallet" | | [Wallacy](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.wallacy) | "io.wallacy" | | [T+ Wallet ](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.talkapp) | "org.talkapp" | | [Capsule](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.usecapsule) | "com.usecapsule" | | [Unity Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.unitywallet) | "com.unitywallet" | | [Sinum](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.sinum) | "app.sinum" | | [SoulSwap](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.soulswap.app) | "finance.soulswap.app" | | [ShapeShift](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.shapeshift) | "com.shapeshift" | | [Panaroma Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.panaroma) | "finance.panaroma" | | [NEOPIN](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.neopin) | "io.neopin" | | [Alicebob Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.alicebob) | "com.alicebob" | | [CyberWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.cyber.wallet) | "co.cyber.wallet" | | [DexTrade](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.dextrade) | "com.dextrade" | | [HashPack](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.hashpack.wallet) | "com.hashpack.wallet" | | [The Pulse Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.thepulsewallet) | "org.thepulsewallet" | | [Pintu](https://portal.thirdweb.com/typescript/v5/supported-wallets/id.co.pintu) | "id.co.pintu" | | [Blade Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.bladewallet) | "io.bladewallet" | | [Pandoshi Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.pandoshi) | "com.pandoshi" | | [Keychain](https://portal.thirdweb.com/typescript/v5/supported-wallets/money.keychain) | "money.keychain" | | [MPCVault \| Team crypto wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.mpcvault.broswerplugin) | "com.mpcvault.broswerplugin" | | [Legacy Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.legacynetwork) | "io.legacynetwork" | | [Clave](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.getclave) | "io.getclave" | | [ioPay](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.iopay) | "me.iopay" | | [Kabila Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.kabila) | "app.kabila" | | [Mixin Messenger](https://portal.thirdweb.com/typescript/v5/supported-wallets/one.mixin.messenger) | "one.mixin.messenger" | | [Bettatrade](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bettatrade) | "com.bettatrade" | | [ScramberryWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.scramberry) | "io.scramberry" | | [Earth Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.earthwallet) | "io.earthwallet" | | [Nest Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.nestwallet) | "xyz.nestwallet" | | [Echooo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.echooo) | "xyz.echooo" | | [Renegade](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.myrenegade) | "net.myrenegade" | | [Ready](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.ready) | "io.ready" | | [hAI by Hacken](https://portal.thirdweb.com/typescript/v5/supported-wallets/ai.hacken) | "ai.hacken" | | [Plutope](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.plutope) | "io.plutope" | | [Trust Asset Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.trustasset) | "io.trustasset" | | [Dfinn Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.dfinnwallet) | "app.dfinnwallet" | | [BMA Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bmawallet) | "com.bmawallet" | | [Spatium](https://portal.thirdweb.com/typescript/v5/supported-wallets/net.spatium.wallet) | "net.spatium.wallet" | | [Transi](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.transi) | "io.transi" | | [Dollet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.dolletwallet) | "com.dolletwallet" | | [Wombat](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.wombat) | "app.wombat" | | [Dropmate](https://portal.thirdweb.com/typescript/v5/supported-wallets/fi.dropmate) | "fi.dropmate" | | [DGPub App](https://portal.thirdweb.com/typescript/v5/supported-wallets/pub.dg) | "pub.dg" | | [icewal](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.icewal) | "com.icewal" | | [metapro wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/one.metapro.wallet) | "one.metapro.wallet" | | [Bonuz Social Smart Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.bonuz) | "xyz.bonuz" | | [Shido App](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.shido) | "io.shido" | | [Life DeFi](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.lifedefi) | "co.lifedefi" | | [Tobi](https://portal.thirdweb.com/typescript/v5/supported-wallets/fun.tobi) | "fun.tobi" | | [Tomo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/inc.tomo) | "inc.tomo" | | [Clot](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.clot) | "app.clot" | | [Komet](https://portal.thirdweb.com/typescript/v5/supported-wallets/me.komet.app) | "me.komet.app" | | [GUARDIIAN Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.guardiianwallet) | "io.guardiianwallet" | | [Wallypto](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.wallypto) | "io.wallypto" | | [SafeMoon](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.safemoon) | "com.safemoon" | | [xPortal](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.elrond.maiar.wallet) | "com.elrond.maiar.wallet" | | [SWOP](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.swopme) | "co.swopme" | | [BitPay Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitpay) | "com.bitpay" | | [Tofee Wallet Official](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.tofee) | "app.tofee" | | [Zypto](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.zypto) | "com.zypto" | | [Orion](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.orion) | "xyz.orion" | | [UPTN](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.uptn.dapp-web) | "io.uptn.dapp-web" | | [Compass Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.compasswallet) | "io.compasswallet" | | [Nicegram Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.nicegram) | "app.nicegram" | | [Open Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.openwallet) | "finance.openwallet" | | [tastycrypto](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.tastycrypto) | "com.tastycrypto" | | [IPMB Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.ipmb) | "com.ipmb" | | [DaffiOne](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.daffione) | "com.daffione" | | [OWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.owallet) | "io.owallet" | | [Beexo](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.beexo) | "com.beexo" | | [WebAuth](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.webauth) | "com.webauth" | | [Plumaa ID](https://portal.thirdweb.com/typescript/v5/supported-wallets/id.plumaa) | "id.plumaa" | | [GM² Social](https://portal.thirdweb.com/typescript/v5/supported-wallets/social.gm2) | "social.gm2" | | [Greenhood](https://portal.thirdweb.com/typescript/v5/supported-wallets/nl.greenhood.wallet) | "nl.greenhood.wallet" | | [TobeWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.companyname.swaptobe) | "com.companyname.swaptobe" | | [PortaWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/finance.porta) | "finance.porta" | | [Alephium Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.alephium) | "org.alephium" | | [OverFlex](https://portal.thirdweb.com/typescript/v5/supported-wallets/network.over) | "network.over" | | [Walletverse](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.walletverse) | "io.walletverse" | | [BeraSig](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.berasig) | "com.berasig" | | [SheFi](https://portal.thirdweb.com/typescript/v5/supported-wallets/org.shefi) | "org.shefi" | | [WEMIX Play](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.wemixplay) | "com.wemixplay" | | [Family](https://portal.thirdweb.com/typescript/v5/supported-wallets/co.family.wallet) | "co.family.wallet" | | [LegionNetwork](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.legionnetwork) | "io.legionnetwork" | | [Bitnovo Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.bitnovo) | "com.bitnovo" | | [SafeWallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.safecryptowallet) | "io.safecryptowallet" | | [Jupiter](https://portal.thirdweb.com/typescript/v5/supported-wallets/ag.jup) | "ag.jup" | | [Koala Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.koalawallet) | "io.koalawallet" | | [NonBank](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.nonbank) | "io.nonbank" | | [UniversalProfiles](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.universaleverything) | "io.universaleverything" | | [Coinbase Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.coinbase.wallet) | "com.coinbase.wallet" | | [Rabby](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.rabby) | "io.rabby" | | [Brave Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.brave.wallet) | "com.brave.wallet" | | [MG](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.moongate.one) | "com.moongate.one" | | [Blanq](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.blanqlabs.wallet) | "com.blanqlabs.wallet" | | [Levain](https://portal.thirdweb.com/typescript/v5/supported-wallets/tech.levain) | "tech.levain" | | [Enkrypt](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.enkrypt) | "com.enkrypt" | | [Scramble](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.scramble) | "com.scramble" | | [FinoaConnect](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.finoa) | "io.finoa" | | [SampleW](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.walletconnect.com) | "com.walletconnect.com" | | [Nightly](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.nightly) | "app.nightly" | | [Blazpay](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.blazpay.wallet) | "com.blazpay.wallet" | | [JOIN MOBILE APP](https://portal.thirdweb.com/typescript/v5/supported-wallets/io.getjoin.prd) | "io.getjoin.prd" | | [Talisman Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.talisman) | "xyz.talisman" | | [clear-wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/eu.flashsoft.clear-wallet) | "eu.flashsoft.clear-wallet" | | [BeraSig](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.berasig) | "app.berasig" | | [LootRush](https://portal.thirdweb.com/typescript/v5/supported-wallets/com.lootrush) | "com.lootrush" | | [Core](https://portal.thirdweb.com/typescript/v5/supported-wallets/app.core.extension) | "app.core.extension" | | [Dawn Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.dawnwallet) | "xyz.dawnwallet" | | [Abstract Global Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/xyz.abs) | "xyz.abs" | | [In-App Wallet](https://portal.thirdweb.com/typescript/v5/supported-wallets/embedded) | "embedded" | | [WalletConnect](https://portal.thirdweb.com/typescript/v5/supported-wallets/walletConnect) | "walletConnect" | ## AccountAddressProps `interface AccountAddressProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## AccountAvatarProps Props for the AccountAvatar component `interface AccountAvatarProps extends Omit, "src">, Omit<[ResolveNameOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveNameOptions), "client" | "address"> {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resolverAddress : string,resolverChain : Readonly<(ChainOptions) & ({ rpc: string })>,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,socialType : "farcaster" | "ens" | "lens",spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### alt `type alt = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### children `type children = ReactNode; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### crossOrigin `type crossOrigin = CrossOrigin; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### decoding `type decoding = "auto" | "async" | "sync"; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the request for fetching the avatar is done but could not retreive any result. You can pass a dummy avatar/image to this prop. If not passed, the component will return `null` `type fallbackComponent = Element; ` ### Example `} />; ` ##### fetchPriority `type fetchPriority = "auto" | "high" | "low"; ` ##### height `type height = string | number; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loading `type loading = "eager" | "lazy"; ` ##### loadingComponent This component will be shown while the avatar of the account is being fetched If not passed, the component will return `null` . You can pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional query options for `useQuery` `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### referrerPolicy `type referrerPolicy = HTMLAttributeReferrerPolicy; ` ##### rel `type rel = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### sizes `type sizes = string; ` ##### slot `type slot = string; ` ##### socialType Use this prop to prioritize the social profile that you want to display This is useful for a wallet containing multiple social profiles. This component inherits all attributes of a HTML's `` , so you can interact with it just like a normal `` `type socialType = "farcaster" | "ens" | "lens"; ` ### Example If you have ENS, Lens and Farcaster profiles linked to your wallet you can prioritize showing the image for Lens by: `; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### srcSet `type srcSet = string; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### useMap `type useMap = string; ` ##### vocab `type vocab = string; ` ##### width `type width = string | number; ` ## AccountBalanceProps Props for the AccountBalance component `interface AccountBalanceProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,chain : Readonly<(ChainOptions) & ({ rpc: string })>,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (props: AccountBalanceInfo) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,showBalanceInFiat : "USD" | "CAD" | "GBP" | "EUR" | "JPY" | "AUD" | "NZD",slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,tokenAddress : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### chain The network to fetch balance on If not passed, the component will use the current chain that the wallet is connected to (`useActiveWalletChain()` ) `type chain = Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the balance fails to be retreived If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the balance was not fetched succesfully `type fallbackComponent = Element; ` ### Example `; ` ##### formatFn ##### Signature `function formatFn(props: [AccountBalanceInfo](https://portal.thirdweb.com/references/typescript/v5/AccountBalanceInfo)): string; ` ##### Parameters ##### props ###### Type `let props: { balance: number; symbol: string }; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the balance of the account is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### showBalanceInFiat Show the token balance in a supported fiat currency (e.g "USD") `type showBalanceInFiat = | "USD" | "CAD" | "GBP" | "EUR" | "JPY" | "AUD" | "NZD"; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### tokenAddress By default this component will fetch the balance for the native token on a given chain If you want to fetch balance for an ERC20 token, use the `tokenAddress` props `type tokenAddress = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## AccountNameProps Props for the AccountName component `interface AccountNameProps extends Omit, "children">, Omit<[ResolveNameOptions](https://portal.thirdweb.com/references/typescript/v5/ResolveNameOptions), "client" | "address"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resolverAddress : string,resolverChain : Readonly<(ChainOptions) & ({ rpc: string })>,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,socialType : "farcaster" | "ens" | "lens",spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the request for fetching the name is done but could not retreive any result. You can pass the wallet address as the fallback option if that's the case. If not passed, the component will return `null` `type fallbackComponent = Element; ` ### Example `; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the name of the account is being fetched If not passed, the component will return `null` . You can pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resolverAddress `type resolverAddress = string; ` ##### resolverChain `type resolverChain = Readonly<[ChainOptions](https://portal.thirdweb.com/references/typescript/v5/ChainOptions) & { rpc: string }>; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### socialType Use this prop to prioritize the social profile that you want to display This is useful for a wallet containing multiple social profiles `type socialType = "farcaster" | "ens" | "lens"; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## ChainIconProps Props for the ChainIcon component `interface ChainIconProps extends Omit, "src"> {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,client : ThirdwebClient,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,iconResolver : string | (() => string) | (() => Promise),id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### alt `type alt = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### children `type children = ReactNode; ` ##### className `type className = string; ` ##### client You need a ThirdwebClient to resolve the icon which is hosted on IPFS. (since most chain icons are hosted on IPFS, loading them via thirdweb gateway will ensure better performance) `type client = [ThirdwebClient](https://portal.thirdweb.com/references/typescript/v5/ThirdwebClient); ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### crossOrigin `type crossOrigin = CrossOrigin; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### decoding `type decoding = "auto" | "async" | "sync"; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the request for fetching the avatar is done but could not retreive any result. You can pass a dummy avatar/image to this prop. If not passed, the component will return `null` `type fallbackComponent = Element; ` ### Example `} />; ` ##### fetchPriority `type fetchPriority = "auto" | "high" | "low"; ` ##### height `type height = string | number; ` ##### hidden `type hidden = boolean; ` ##### iconResolver This prop can be a string or a (async) function that resolves to a string, representing the icon url of the chain This is particularly useful if you already have a way to fetch the chain icon. `type iconResolver = string | (() => string) | (() => Promise); ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loading `type loading = "eager" | "lazy"; ` ##### loadingComponent This component will be shown while the avatar of the icon is being fetched If not passed, the component will return `null` . You can pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional query options for `useQuery` `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### referrerPolicy `type referrerPolicy = HTMLAttributeReferrerPolicy; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### sizes `type sizes = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### srcSet `type srcSet = string; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### useMap `type useMap = string; ` ##### vocab `type vocab = string; ` ##### width `type width = string | number; ` ## ChainNameProps Props for the ChainName component `interface ChainNameProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the name fails to be retreived If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the name was not fetched succesfully `type fallbackComponent = Element; ` ### Example `Failed to load} />; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the name of the chain is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nameResolver This prop can be a string or a (async) function that resolves to a string, representing the name of the chain This is particularly useful if you already have a way to fetch the chain name. `type nameResolver = string | (() => string) | (() => Promise); ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## NFTNameProps `interface NFTNameProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent `type fallbackComponent = Element; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent `type loadingComponent = Element; ` ##### nameResolver This prop can be a string or a (async) function that resolves to a string, representing the name of the NFT This is particularly useful if you already have a way to fetch the name of the NFT. `type nameResolver = string | (() => string) | (() => Promise); ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## NFTDescriptionProps `interface NFTDescriptionProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),descriptionResolver : string | (() => string) | (() => Promise),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### descriptionResolver This prop can be a string or a (async) function that resolves to a string, representing the description of the NFT This is particularly useful if you already have a way to fetch the data. `type descriptionResolver = | string | (() => string) | (() => Promise); ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent `type fallbackComponent = Element; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent `type loadingComponent = Element; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## SocialIconProps `interface SocialIconProps extends Omit, "src"> {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,provider : string,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### alt `type alt = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### children `type children = ReactNode; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### crossOrigin `type crossOrigin = CrossOrigin; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### decoding `type decoding = "auto" | "async" | "sync"; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fetchPriority `type fetchPriority = "auto" | "high" | "low"; ` ##### height `type height = string | number; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loading `type loading = "eager" | "lazy"; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### provider `type provider = string; ` ##### radioGroup `type radioGroup = string; ` ##### referrerPolicy `type referrerPolicy = HTMLAttributeReferrerPolicy; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### sizes `type sizes = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### srcSet `type srcSet = string; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### useMap `type useMap = string; ` ##### vocab `type vocab = string; ` ##### width `type width = string | number; ` ## TokenIconProps Props for the TokenIcon component `interface TokenIconProps extends Omit, "src"> {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,iconResolver : string | (() => string) | (() => Promise),id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### alt `type alt = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### children `type children = ReactNode; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### crossOrigin `type crossOrigin = CrossOrigin; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### decoding `type decoding = "auto" | "async" | "sync"; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the request for fetching the avatar is done but could not retreive any result. You can pass a dummy avatar/image to this prop. If not passed, the component will return `null` `type fallbackComponent = Element; ` ### Example `} />; ` ##### fetchPriority `type fetchPriority = "auto" | "high" | "low"; ` ##### height `type height = string | number; ` ##### hidden `type hidden = boolean; ` ##### iconResolver This prop can be a string or a (async) function that resolves to a string, representing the icon url of the token This is particularly useful if you already have a way to fetch the token icon. `type iconResolver = string | (() => string) | (() => Promise); ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loading `type loading = "eager" | "lazy"; ` ##### loadingComponent This component will be shown while the avatar of the icon is being fetched If not passed, the component will return `null` . You can pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional query options for `useQuery` `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### referrerPolicy `type referrerPolicy = HTMLAttributeReferrerPolicy; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### sizes `type sizes = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### srcSet `type srcSet = string; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### useMap `type useMap = string; ` ##### vocab `type vocab = string; ` ##### width `type width = string | number; ` ## TokenNameProps Props for the TokenName component `interface TokenNameProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nameResolver : string | (() => string) | (() => Promise),nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the name fails to be retreived If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the name was not fetched succesfully `type fallbackComponent = Element; ` ### Example `; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the name of the token is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nameResolver This prop can be a string or a (async) function that resolves to a string, representing the name of the token This is particularly useful if you already have a way to fetch the token name. `type nameResolver = string | (() => string) | (() => Promise); ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## TokenSymbolProps Props for the TokenSymbol component `interface TokenSymbolProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,symbolResolver : string | (() => string) | (() => Promise),tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the symbol fails to be retreived If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the symbol was not fetched succesfully `type fallbackComponent = Element; ` ### Example `; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the symbol of the token is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### symbolResolver This prop can be a string or a (async) function that resolves to a string, representing the symbol of the token This is particularly useful if you already have a way to fetch the token symbol. `type symbolResolver = | string | (() => string) | (() => Promise); ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; ` ## WalletIconProps `interface WalletIconProps extends Omit, "src"> {about : string,accessKey : string,alt : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,children : ReactNode,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,crossOrigin : CrossOrigin,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,decoding : "auto" | "async" | "sync",defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,fetchPriority : "auto" | "high" | "low",height : string | number,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loading : "eager" | "lazy",loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,referrerPolicy : HTMLAttributeReferrerPolicy,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,sizes : string,slot : string,spellCheck : Booleanish,srcSet : string,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",useMap : string,vocab : string,width : string | number} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### alt `type alt = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### children `type children = ReactNode; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### crossOrigin `type crossOrigin = CrossOrigin; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### decoding `type decoding = "auto" | "async" | "sync"; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the icon fails to be retrieved If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the icon was not fetched successfully `type fallbackComponent = Element; ` ### Example `Failed to load} />; ` ##### fetchPriority `type fetchPriority = "auto" | "high" | "low"; ` ##### height `type height = string | number; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loading `type loading = "eager" | "lazy"; ` ##### loadingComponent This component will be shown while the icon of the wallet is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### referrerPolicy `type referrerPolicy = HTMLAttributeReferrerPolicy; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### sizes `type sizes = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### srcSet `type srcSet = string; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### useMap `type useMap = string; ` ##### vocab `type vocab = string; ` ##### width `type width = string | number; ` ## WalletNameProps Props for the WalletName component `interface WalletNameProps extends Omit, "children"> {about : string,accessKey : string,aria-activedescendant : string,aria-atomic : Booleanish,aria-autocomplete : "inline" | "none" | "list" | "both",aria-braillelabel : string,aria-brailleroledescription : string,aria-busy : Booleanish,aria-checked : boolean | "false" | "true" | "mixed",aria-colcount : number,aria-colindex : number,aria-colindextext : string,aria-colspan : number,aria-controls : string,aria-current : boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date",aria-describedby : string,aria-description : string,aria-details : string,aria-disabled : Booleanish,aria-dropeffect : "link" | "popup" | "execute" | "none" | "copy" | "move",aria-errormessage : string,aria-expanded : Booleanish,aria-flowto : string,aria-grabbed : Booleanish,aria-haspopup : boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree",aria-hidden : Booleanish,aria-invalid : boolean | "false" | "true" | "grammar" | "spelling",aria-keyshortcuts : string,aria-label : string,aria-labelledby : string,aria-level : number,aria-live : "off" | "polite" | "assertive",aria-modal : Booleanish,aria-multiline : Booleanish,aria-multiselectable : Booleanish,aria-orientation : "horizontal" | "vertical",aria-owns : string,aria-placeholder : string,aria-posinset : number,aria-pressed : boolean | "false" | "true" | "mixed",aria-readonly : Booleanish,aria-relevant : "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals",aria-required : Booleanish,aria-roledescription : string,aria-rowcount : number,aria-rowindex : number,aria-rowindextext : string,aria-rowspan : number,aria-selected : Booleanish,aria-setsize : number,aria-sort : "none" | "ascending" | "descending" | "other",aria-valuemax : number,aria-valuemin : number,aria-valuenow : number,aria-valuetext : string,autoCapitalize : (string & ({ })) | "on" | "off" | "none" | "sentences" | "words" | "characters",autoCorrect : string,autoFocus : boolean,autoSave : string,className : string,color : string,content : string,contentEditable : "inherit" | (Booleanish) | "plaintext-only",contextMenu : string,dangerouslySetInnerHTML : { __html: string | (TrustedHTML) },datatype : string,defaultChecked : boolean,defaultValue : string | number | (readonly Array),dir : string,draggable : Booleanish,enterKeyHint : "search" | "done" | "next" | "send" | "enter" | "go" | "previous",fallbackComponent : Element,formatFn : (str: string) => string,hidden : boolean,id : string,inert : boolean,inlist : any,inputMode : "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal",is : string,itemID : string,itemProp : string,itemRef : string,itemScope : boolean,itemType : string,lang : string,loadingComponent : Element,nonce : string,onAbort : ReactEventHandler,onAbortCapture : ReactEventHandler,onAnimationEnd : AnimationEventHandler,onAnimationEndCapture : AnimationEventHandler,onAnimationIteration : AnimationEventHandler,onAnimationIterationCapture : AnimationEventHandler,onAnimationStart : AnimationEventHandler,onAnimationStartCapture : AnimationEventHandler,onAuxClick : MouseEventHandler,onAuxClickCapture : MouseEventHandler,onBeforeInput : FormEventHandler,onBeforeInputCapture : FormEventHandler,onBeforeToggle : ToggleEventHandler,onBlur : FocusEventHandler,onBlurCapture : FocusEventHandler,onCanPlay : ReactEventHandler,onCanPlayCapture : ReactEventHandler,onCanPlayThrough : ReactEventHandler,onCanPlayThroughCapture : ReactEventHandler,onChange : FormEventHandler,onChangeCapture : FormEventHandler,onClick : MouseEventHandler,onClickCapture : MouseEventHandler,onCompositionEnd : CompositionEventHandler,onCompositionEndCapture : CompositionEventHandler,onCompositionStart : CompositionEventHandler,onCompositionStartCapture : CompositionEventHandler,onCompositionUpdate : CompositionEventHandler,onCompositionUpdateCapture : CompositionEventHandler,onContextMenu : MouseEventHandler,onContextMenuCapture : MouseEventHandler,onCopy : ClipboardEventHandler,onCopyCapture : ClipboardEventHandler,onCut : ClipboardEventHandler,onCutCapture : ClipboardEventHandler,onDoubleClick : MouseEventHandler,onDoubleClickCapture : MouseEventHandler,onDrag : DragEventHandler,onDragCapture : DragEventHandler,onDragEnd : DragEventHandler,onDragEndCapture : DragEventHandler,onDragEnter : DragEventHandler,onDragEnterCapture : DragEventHandler,onDragExit : DragEventHandler,onDragExitCapture : DragEventHandler,onDragLeave : DragEventHandler,onDragLeaveCapture : DragEventHandler,onDragOver : DragEventHandler,onDragOverCapture : DragEventHandler,onDragStart : DragEventHandler,onDragStartCapture : DragEventHandler,onDrop : DragEventHandler,onDropCapture : DragEventHandler,onDurationChange : ReactEventHandler,onDurationChangeCapture : ReactEventHandler,onEmptied : ReactEventHandler,onEmptiedCapture : ReactEventHandler,onEncrypted : ReactEventHandler,onEncryptedCapture : ReactEventHandler,onEnded : ReactEventHandler,onEndedCapture : ReactEventHandler,onError : ReactEventHandler,onErrorCapture : ReactEventHandler,onFocus : FocusEventHandler,onFocusCapture : FocusEventHandler,onGotPointerCapture : PointerEventHandler,onGotPointerCaptureCapture : PointerEventHandler,onInput : FormEventHandler,onInputCapture : FormEventHandler,onInvalid : FormEventHandler,onInvalidCapture : FormEventHandler,onKeyDown : KeyboardEventHandler,onKeyDownCapture : KeyboardEventHandler,onKeyPress : KeyboardEventHandler,onKeyPressCapture : KeyboardEventHandler,onKeyUp : KeyboardEventHandler,onKeyUpCapture : KeyboardEventHandler,onLoad : ReactEventHandler,onLoadCapture : ReactEventHandler,onLoadedData : ReactEventHandler,onLoadedDataCapture : ReactEventHandler,onLoadedMetadata : ReactEventHandler,onLoadedMetadataCapture : ReactEventHandler,onLoadStart : ReactEventHandler,onLoadStartCapture : ReactEventHandler,onLostPointerCapture : PointerEventHandler,onLostPointerCaptureCapture : PointerEventHandler,onMouseDown : MouseEventHandler,onMouseDownCapture : MouseEventHandler,onMouseEnter : MouseEventHandler,onMouseLeave : MouseEventHandler,onMouseMove : MouseEventHandler,onMouseMoveCapture : MouseEventHandler,onMouseOut : MouseEventHandler,onMouseOutCapture : MouseEventHandler,onMouseOver : MouseEventHandler,onMouseOverCapture : MouseEventHandler,onMouseUp : MouseEventHandler,onMouseUpCapture : MouseEventHandler,onPaste : ClipboardEventHandler,onPasteCapture : ClipboardEventHandler,onPause : ReactEventHandler,onPauseCapture : ReactEventHandler,onPlay : ReactEventHandler,onPlayCapture : ReactEventHandler,onPlaying : ReactEventHandler,onPlayingCapture : ReactEventHandler,onPointerCancel : PointerEventHandler,onPointerCancelCapture : PointerEventHandler,onPointerDown : PointerEventHandler,onPointerDownCapture : PointerEventHandler,onPointerEnter : PointerEventHandler,onPointerLeave : PointerEventHandler,onPointerMove : PointerEventHandler,onPointerMoveCapture : PointerEventHandler,onPointerOut : PointerEventHandler,onPointerOutCapture : PointerEventHandler,onPointerOver : PointerEventHandler,onPointerOverCapture : PointerEventHandler,onPointerUp : PointerEventHandler,onPointerUpCapture : PointerEventHandler,onProgress : ReactEventHandler,onProgressCapture : ReactEventHandler,onRateChange : ReactEventHandler,onRateChangeCapture : ReactEventHandler,onReset : FormEventHandler,onResetCapture : FormEventHandler,onResize : ReactEventHandler,onResizeCapture : ReactEventHandler,onScroll : UIEventHandler,onScrollCapture : UIEventHandler,onSeeked : ReactEventHandler,onSeekedCapture : ReactEventHandler,onSeeking : ReactEventHandler,onSeekingCapture : ReactEventHandler,onSelect : ReactEventHandler,onSelectCapture : ReactEventHandler,onStalled : ReactEventHandler,onStalledCapture : ReactEventHandler,onSubmit : FormEventHandler,onSubmitCapture : FormEventHandler,onSuspend : ReactEventHandler,onSuspendCapture : ReactEventHandler,onTimeUpdate : ReactEventHandler,onTimeUpdateCapture : ReactEventHandler,onToggle : ToggleEventHandler,onTouchCancel : TouchEventHandler,onTouchCancelCapture : TouchEventHandler,onTouchEnd : TouchEventHandler,onTouchEndCapture : TouchEventHandler,onTouchMove : TouchEventHandler,onTouchMoveCapture : TouchEventHandler,onTouchStart : TouchEventHandler,onTouchStartCapture : TouchEventHandler,onTransitionCancel : TransitionEventHandler,onTransitionCancelCapture : TransitionEventHandler,onTransitionEnd : TransitionEventHandler,onTransitionEndCapture : TransitionEventHandler,onTransitionRun : TransitionEventHandler,onTransitionRunCapture : TransitionEventHandler,onTransitionStart : TransitionEventHandler,onTransitionStartCapture : TransitionEventHandler,onVolumeChange : ReactEventHandler,onVolumeChangeCapture : ReactEventHandler,onWaiting : ReactEventHandler,onWaitingCapture : ReactEventHandler,onWheel : WheelEventHandler,onWheelCapture : WheelEventHandler,popover : "" | "auto" | "manual",popoverTarget : string,popoverTargetAction : "toggle" | "hide" | "show",prefix : string,property : string,queryOptions : Omit>, "queryKey" | "queryFn">,radioGroup : string,rel : string,resource : string,results : number,rev : string,role : AriaRole,security : string,slot : string,spellCheck : Booleanish,style : CSSProperties,suppressContentEditableWarning : boolean,suppressHydrationWarning : boolean,tabIndex : number,title : string,translate : "yes" | "no",typeof : string,unselectable : "on" | "off",vocab : string} ` ##### about `type about = string; ` ##### accessKey `type accessKey = string; ` ##### aria-activedescendant Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. `type aria-activedescendant = string ` ##### aria-atomic Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. `type aria-atomic = Booleanish ` ##### aria-autocomplete Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made. `type aria-autocomplete = "inline" | "none" | "list" | "both" ` ##### aria-braillelabel Defines a string value that labels the current element, which is intended to be converted into Braille. aria-label. `type aria-braillelabel = string ` ##### aria-brailleroledescription Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille. aria-roledescription. `type aria-brailleroledescription = string ` ##### aria-busy `type aria-busy = Booleanish ` ##### aria-checked Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. * aria-pressed * aria-selected. `type aria-checked = boolean | "false" | "true" | "mixed" ` ##### aria-colcount Defines the total number of columns in a table, grid, or treegrid. aria-colindex. `type aria-colcount = number ` ##### aria-colindex Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. * aria-colcount * aria-colspan. `type aria-colindex = number ` ##### aria-colindextext Defines a human readable text alternative of aria-colindex. aria-rowindextext. `type aria-colindextext = string ` ##### aria-colspan Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. * aria-colindex * aria-rowspan. `type aria-colspan = number ` ##### aria-controls Identifies the element (or elements) whose contents or presence are controlled by the current element. aria-owns. `type aria-controls = string ` ##### aria-current Indicates the element that represents the current item within a container or set of related elements. `type aria-current = boolean | "false" | "true" | "time" | "step" | "page" | "location" | "date" ` ##### aria-describedby Identifies the element (or elements) that describes the object. aria-labelledby `type aria-describedby = string ` ##### aria-description Defines a string value that describes or annotates the current element. related aria-describedby. `type aria-description = string ` ##### aria-details Identifies the element that provides a detailed, extended description for the object. aria-describedby. `type aria-details = string ` ##### aria-disabled Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. * aria-hidden * aria-readonly. `type aria-disabled = Booleanish ` ##### aria-dropeffect Deprecated in ARIA 1.1 Indicates what functions can be performed when a dragged object is released on the drop target. `type aria-dropeffect = "link" | "popup" | "execute" | "none" | "copy" | "move" ` ##### aria-errormessage Identifies the element that provides an error message for the object. * aria-invalid * aria-describedby. `type aria-errormessage = string ` ##### aria-expanded Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. `type aria-expanded = Booleanish ` ##### aria-flowto Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. `type aria-flowto = string ` ##### aria-grabbed Deprecated in ARIA 1.1 Indicates an element's "grabbed" state in a drag-and-drop operation. `type aria-grabbed = Booleanish ` ##### aria-haspopup Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. `type aria-haspopup = boolean | "false" | "true" | "dialog" | "grid" | "listbox" | "menu" | "tree" ` ##### aria-hidden Indicates whether the element is exposed to an accessibility API. aria-disabled. `type aria-hidden = Booleanish ` ##### aria-invalid Indicates the entered value does not conform to the format expected by the application. aria-errormessage. `type aria-invalid = boolean | "false" | "true" | "grammar" | "spelling" ` ##### aria-keyshortcuts Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. `type aria-keyshortcuts = string ` ##### aria-label Defines a string value that labels the current element. aria-labelledby. `type aria-label = string ` ##### aria-labelledby Identifies the element (or elements) that labels the current element. aria-describedby. `type aria-labelledby = string ` ##### aria-level Defines the hierarchical level of an element within a structure. `type aria-level = number ` ##### aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. `type aria-live = "off" | "polite" | "assertive" ` ##### aria-modal Indicates whether an element is modal when displayed. `type aria-modal = Booleanish ` ##### aria-multiline Indicates whether a text box accepts multiple lines of input or only a single line. `type aria-multiline = Booleanish ` ##### aria-multiselectable Indicates that the user may select more than one item from the current selectable descendants. `type aria-multiselectable = Booleanish ` ##### aria-orientation Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. `type aria-orientation = "horizontal" | "vertical" ` ##### aria-owns Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. aria-controls. `type aria-owns = string ` ##### aria-placeholder Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format. `type aria-placeholder = string ` ##### aria-posinset Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-setsize. `type aria-posinset = number ` ##### aria-pressed Indicates the current "pressed" state of toggle buttons. * aria-checked * aria-selected. `type aria-pressed = boolean | "false" | "true" | "mixed" ` ##### aria-readonly Indicates that the element is not editable, but is otherwise operable. aria-disabled. `type aria-readonly = Booleanish ` ##### aria-relevant Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. aria-atomic. `type aria-relevant = "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" ` ##### aria-required Indicates that user input is required on the element before a form may be submitted. `type aria-required = Booleanish ` ##### aria-roledescription Defines a human-readable, author-localized description for the role of an element. `type aria-roledescription = string ` ##### aria-rowcount Defines the total number of rows in a table, grid, or treegrid. aria-rowindex. `type aria-rowcount = number ` ##### aria-rowindex Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. * aria-rowcount * aria-rowspan. `type aria-rowindex = number ` ##### aria-rowindextext Defines a human readable text alternative of aria-rowindex. aria-colindextext. `type aria-rowindextext = string ` ##### aria-rowspan Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. * aria-rowindex * aria-colspan. `type aria-rowspan = number ` ##### aria-selected Indicates the current "selected" state of various widgets. * aria-checked * aria-pressed. `type aria-selected = Booleanish ` ##### aria-setsize Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. aria-posinset. `type aria-setsize = number ` ##### aria-sort Indicates if items in a table or grid are sorted in ascending or descending order. `type aria-sort = "none" | "ascending" | "descending" | "other" ` ##### aria-valuemax Defines the maximum allowed value for a range widget. `type aria-valuemax = number ` ##### aria-valuemin Defines the minimum allowed value for a range widget. `type aria-valuemin = number ` ##### aria-valuenow Defines the current value for a range widget. aria-valuetext. `type aria-valuenow = number ` ##### aria-valuetext Defines the human readable text alternative of aria-valuenow for a range widget. `type aria-valuetext = string ` ##### autoCapitalize `type autoCapitalize = | (string & {}) | "on" | "off" | "none" | "sentences" | "words" | "characters"; ` ##### autoCorrect `type autoCorrect = string; ` ##### autoFocus `type autoFocus = boolean; ` ##### autoSave `type autoSave = string; ` ##### className `type className = string; ` ##### color `type color = string; ` ##### content `type content = string; ` ##### contentEditable `type contentEditable = "inherit" | Booleanish | "plaintext-only"; ` ##### contextMenu `type contextMenu = string; ` ##### dangerouslySetInnerHTML `type dangerouslySetInnerHTML = { __html: string | TrustedHTML }; ` ##### datatype `type datatype = string; ` ##### defaultChecked `type defaultChecked = boolean; ` ##### defaultValue `type defaultValue = string | number | (readonly Array) ` ##### dir `type dir = string; ` ##### draggable `type draggable = Booleanish; ` ##### enterKeyHint `type enterKeyHint = | "search" | "done" | "next" | "send" | "enter" | "go" | "previous"; ` ##### fallbackComponent This component will be shown if the name fails to be retreived If not passed, the component will return `null` . You can/should pass a descriptive text/component to this prop, indicating that the name was not fetched succesfully `type fallbackComponent = Element; ` ### Example `Failed to load} />; ` ##### formatFn ##### Signature `function formatFn(str: string): string; ` ##### Parameters ##### str ###### Type `let str: string; ` ##### Returns ##### Return Type `let returnType: string; ` ##### hidden `type hidden = boolean; ` ##### id `type id = string; ` ##### inert https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert `type inert = boolean; ` ##### inlist `type inlist = any; ` ##### inputMode Hints at the type of data that might be entered by the user while editing the element or its contents [ https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute](https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute) `type inputMode = | "search" | "email" | "url" | "text" | "none" | "tel" | "numeric" | "decimal"; ` ##### is Specify that a standard HTML element should behave like a defined custom built-in element [ https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is](https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is) `type is = string; ` ##### itemID `type itemID = string; ` ##### itemProp `type itemProp = string; ` ##### itemRef `type itemRef = string; ` ##### itemScope `type itemScope = boolean; ` ##### itemType `type itemType = string; ` ##### lang `type lang = string; ` ##### loadingComponent This component will be shown while the name of the wallet name is being fetched If not passed, the component will return `null` . You can/should pass a loading sign or spinner to this prop. `type loadingComponent = Element; ` ### Example `} />; ` ##### nonce `type nonce = string; ` ##### onAbort `type onAbort = ReactEventHandler; ` ##### onAbortCapture `type onAbortCapture = ReactEventHandler; ` ##### onAnimationEnd `type onAnimationEnd = AnimationEventHandler; ` ##### onAnimationEndCapture `type onAnimationEndCapture = AnimationEventHandler; ` ##### onAnimationIteration `type onAnimationIteration = AnimationEventHandler; ` ##### onAnimationIterationCapture `type onAnimationIterationCapture = AnimationEventHandler; ` ##### onAnimationStart `type onAnimationStart = AnimationEventHandler; ` ##### onAnimationStartCapture `type onAnimationStartCapture = AnimationEventHandler; ` ##### onAuxClick `type onAuxClick = MouseEventHandler; ` ##### onAuxClickCapture `type onAuxClickCapture = MouseEventHandler; ` ##### onBeforeInput `type onBeforeInput = FormEventHandler; ` ##### onBeforeInputCapture `type onBeforeInputCapture = FormEventHandler; ` ##### onBeforeToggle `type onBeforeToggle = ToggleEventHandler; ` ##### onBlur `type onBlur = FocusEventHandler; ` ##### onBlurCapture `type onBlurCapture = FocusEventHandler; ` ##### onCanPlay `type onCanPlay = ReactEventHandler; ` ##### onCanPlayCapture `type onCanPlayCapture = ReactEventHandler; ` ##### onCanPlayThrough `type onCanPlayThrough = ReactEventHandler; ` ##### onCanPlayThroughCapture `type onCanPlayThroughCapture = ReactEventHandler; ` ##### onChange `type onChange = FormEventHandler; ` ##### onChangeCapture `type onChangeCapture = FormEventHandler; ` ##### onClick `type onClick = MouseEventHandler; ` ##### onClickCapture `type onClickCapture = MouseEventHandler; ` ##### onCompositionEnd `type onCompositionEnd = CompositionEventHandler; ` ##### onCompositionEndCapture `type onCompositionEndCapture = CompositionEventHandler; ` ##### onCompositionStart `type onCompositionStart = CompositionEventHandler; ` ##### onCompositionStartCapture `type onCompositionStartCapture = CompositionEventHandler; ` ##### onCompositionUpdate `type onCompositionUpdate = CompositionEventHandler; ` ##### onCompositionUpdateCapture `type onCompositionUpdateCapture = CompositionEventHandler; ` ##### onContextMenu `type onContextMenu = MouseEventHandler; ` ##### onContextMenuCapture `type onContextMenuCapture = MouseEventHandler; ` ##### onCopy `type onCopy = ClipboardEventHandler; ` ##### onCopyCapture `type onCopyCapture = ClipboardEventHandler; ` ##### onCut `type onCut = ClipboardEventHandler; ` ##### onCutCapture `type onCutCapture = ClipboardEventHandler; ` ##### onDoubleClick `type onDoubleClick = MouseEventHandler; ` ##### onDoubleClickCapture `type onDoubleClickCapture = MouseEventHandler; ` ##### onDrag `type onDrag = DragEventHandler; ` ##### onDragCapture `type onDragCapture = DragEventHandler; ` ##### onDragEnd `type onDragEnd = DragEventHandler; ` ##### onDragEndCapture `type onDragEndCapture = DragEventHandler; ` ##### onDragEnter `type onDragEnter = DragEventHandler; ` ##### onDragEnterCapture `type onDragEnterCapture = DragEventHandler; ` ##### onDragExit `type onDragExit = DragEventHandler; ` ##### onDragExitCapture `type onDragExitCapture = DragEventHandler; ` ##### onDragLeave `type onDragLeave = DragEventHandler; ` ##### onDragLeaveCapture `type onDragLeaveCapture = DragEventHandler; ` ##### onDragOver `type onDragOver = DragEventHandler; ` ##### onDragOverCapture `type onDragOverCapture = DragEventHandler; ` ##### onDragStart `type onDragStart = DragEventHandler; ` ##### onDragStartCapture `type onDragStartCapture = DragEventHandler; ` ##### onDrop `type onDrop = DragEventHandler; ` ##### onDropCapture `type onDropCapture = DragEventHandler; ` ##### onDurationChange `type onDurationChange = ReactEventHandler; ` ##### onDurationChangeCapture `type onDurationChangeCapture = ReactEventHandler; ` ##### onEmptied `type onEmptied = ReactEventHandler; ` ##### onEmptiedCapture `type onEmptiedCapture = ReactEventHandler; ` ##### onEncrypted `type onEncrypted = ReactEventHandler; ` ##### onEncryptedCapture `type onEncryptedCapture = ReactEventHandler; ` ##### onEnded `type onEnded = ReactEventHandler; ` ##### onEndedCapture `type onEndedCapture = ReactEventHandler; ` ##### onError `type onError = ReactEventHandler; ` ##### onErrorCapture `type onErrorCapture = ReactEventHandler; ` ##### onFocus `type onFocus = FocusEventHandler; ` ##### onFocusCapture `type onFocusCapture = FocusEventHandler; ` ##### onGotPointerCapture `type onGotPointerCapture = PointerEventHandler; ` ##### onGotPointerCaptureCapture `type onGotPointerCaptureCapture = PointerEventHandler; ` ##### onInput `type onInput = FormEventHandler; ` ##### onInputCapture `type onInputCapture = FormEventHandler; ` ##### onInvalid `type onInvalid = FormEventHandler; ` ##### onInvalidCapture `type onInvalidCapture = FormEventHandler; ` ##### onKeyDown `type onKeyDown = KeyboardEventHandler; ` ##### onKeyDownCapture `type onKeyDownCapture = KeyboardEventHandler; ` ##### onKeyPress Deprecated Use `onKeyUp` or `onKeyDown` instead `type onKeyPress = KeyboardEventHandler; ` ##### onKeyPressCapture Deprecated Use `onKeyUpCapture` or `onKeyDownCapture` instead `type onKeyPressCapture = KeyboardEventHandler; ` ##### onKeyUp `type onKeyUp = KeyboardEventHandler; ` ##### onKeyUpCapture `type onKeyUpCapture = KeyboardEventHandler; ` ##### onLoad `type onLoad = ReactEventHandler; ` ##### onLoadCapture `type onLoadCapture = ReactEventHandler; ` ##### onLoadedData `type onLoadedData = ReactEventHandler; ` ##### onLoadedDataCapture `type onLoadedDataCapture = ReactEventHandler; ` ##### onLoadedMetadata `type onLoadedMetadata = ReactEventHandler; ` ##### onLoadedMetadataCapture `type onLoadedMetadataCapture = ReactEventHandler; ` ##### onLoadStart `type onLoadStart = ReactEventHandler; ` ##### onLoadStartCapture `type onLoadStartCapture = ReactEventHandler; ` ##### onLostPointerCapture `type onLostPointerCapture = PointerEventHandler; ` ##### onLostPointerCaptureCapture `type onLostPointerCaptureCapture = PointerEventHandler; ` ##### onMouseDown `type onMouseDown = MouseEventHandler; ` ##### onMouseDownCapture `type onMouseDownCapture = MouseEventHandler; ` ##### onMouseEnter `type onMouseEnter = MouseEventHandler; ` ##### onMouseLeave `type onMouseLeave = MouseEventHandler; ` ##### onMouseMove `type onMouseMove = MouseEventHandler; ` ##### onMouseMoveCapture `type onMouseMoveCapture = MouseEventHandler; ` ##### onMouseOut `type onMouseOut = MouseEventHandler; ` ##### onMouseOutCapture `type onMouseOutCapture = MouseEventHandler; ` ##### onMouseOver `type onMouseOver = MouseEventHandler; ` ##### onMouseOverCapture `type onMouseOverCapture = MouseEventHandler; ` ##### onMouseUp `type onMouseUp = MouseEventHandler; ` ##### onMouseUpCapture `type onMouseUpCapture = MouseEventHandler; ` ##### onPaste `type onPaste = ClipboardEventHandler; ` ##### onPasteCapture `type onPasteCapture = ClipboardEventHandler; ` ##### onPause `type onPause = ReactEventHandler; ` ##### onPauseCapture `type onPauseCapture = ReactEventHandler; ` ##### onPlay `type onPlay = ReactEventHandler; ` ##### onPlayCapture `type onPlayCapture = ReactEventHandler; ` ##### onPlaying `type onPlaying = ReactEventHandler; ` ##### onPlayingCapture `type onPlayingCapture = ReactEventHandler; ` ##### onPointerCancel `type onPointerCancel = PointerEventHandler; ` ##### onPointerCancelCapture `type onPointerCancelCapture = PointerEventHandler; ` ##### onPointerDown `type onPointerDown = PointerEventHandler; ` ##### onPointerDownCapture `type onPointerDownCapture = PointerEventHandler; ` ##### onPointerEnter `type onPointerEnter = PointerEventHandler; ` ##### onPointerLeave `type onPointerLeave = PointerEventHandler; ` ##### onPointerMove `type onPointerMove = PointerEventHandler; ` ##### onPointerMoveCapture `type onPointerMoveCapture = PointerEventHandler; ` ##### onPointerOut `type onPointerOut = PointerEventHandler; ` ##### onPointerOutCapture `type onPointerOutCapture = PointerEventHandler; ` ##### onPointerOver `type onPointerOver = PointerEventHandler; ` ##### onPointerOverCapture `type onPointerOverCapture = PointerEventHandler; ` ##### onPointerUp `type onPointerUp = PointerEventHandler; ` ##### onPointerUpCapture `type onPointerUpCapture = PointerEventHandler; ` ##### onProgress `type onProgress = ReactEventHandler; ` ##### onProgressCapture `type onProgressCapture = ReactEventHandler; ` ##### onRateChange `type onRateChange = ReactEventHandler; ` ##### onRateChangeCapture `type onRateChangeCapture = ReactEventHandler; ` ##### onReset `type onReset = FormEventHandler; ` ##### onResetCapture `type onResetCapture = FormEventHandler; ` ##### onResize `type onResize = ReactEventHandler; ` ##### onResizeCapture `type onResizeCapture = ReactEventHandler; ` ##### onScroll `type onScroll = UIEventHandler; ` ##### onScrollCapture `type onScrollCapture = UIEventHandler; ` ##### onSeeked `type onSeeked = ReactEventHandler; ` ##### onSeekedCapture `type onSeekedCapture = ReactEventHandler; ` ##### onSeeking `type onSeeking = ReactEventHandler; ` ##### onSeekingCapture `type onSeekingCapture = ReactEventHandler; ` ##### onSelect `type onSelect = ReactEventHandler; ` ##### onSelectCapture `type onSelectCapture = ReactEventHandler; ` ##### onStalled `type onStalled = ReactEventHandler; ` ##### onStalledCapture `type onStalledCapture = ReactEventHandler; ` ##### onSubmit `type onSubmit = FormEventHandler; ` ##### onSubmitCapture `type onSubmitCapture = FormEventHandler; ` ##### onSuspend `type onSuspend = ReactEventHandler; ` ##### onSuspendCapture `type onSuspendCapture = ReactEventHandler; ` ##### onTimeUpdate `type onTimeUpdate = ReactEventHandler; ` ##### onTimeUpdateCapture `type onTimeUpdateCapture = ReactEventHandler; ` ##### onToggle `type onToggle = ToggleEventHandler; ` ##### onTouchCancel `type onTouchCancel = TouchEventHandler; ` ##### onTouchCancelCapture `type onTouchCancelCapture = TouchEventHandler; ` ##### onTouchEnd `type onTouchEnd = TouchEventHandler; ` ##### onTouchEndCapture `type onTouchEndCapture = TouchEventHandler; ` ##### onTouchMove `type onTouchMove = TouchEventHandler; ` ##### onTouchMoveCapture `type onTouchMoveCapture = TouchEventHandler; ` ##### onTouchStart `type onTouchStart = TouchEventHandler; ` ##### onTouchStartCapture `type onTouchStartCapture = TouchEventHandler; ` ##### onTransitionCancel `type onTransitionCancel = TransitionEventHandler; ` ##### onTransitionCancelCapture `type onTransitionCancelCapture = TransitionEventHandler; ` ##### onTransitionEnd `type onTransitionEnd = TransitionEventHandler; ` ##### onTransitionEndCapture `type onTransitionEndCapture = TransitionEventHandler; ` ##### onTransitionRun `type onTransitionRun = TransitionEventHandler; ` ##### onTransitionRunCapture `type onTransitionRunCapture = TransitionEventHandler; ` ##### onTransitionStart `type onTransitionStart = TransitionEventHandler; ` ##### onTransitionStartCapture `type onTransitionStartCapture = TransitionEventHandler; ` ##### onVolumeChange `type onVolumeChange = ReactEventHandler; ` ##### onVolumeChangeCapture `type onVolumeChangeCapture = ReactEventHandler; ` ##### onWaiting `type onWaiting = ReactEventHandler; ` ##### onWaitingCapture `type onWaitingCapture = ReactEventHandler; ` ##### onWheel `type onWheel = WheelEventHandler; ` ##### onWheelCapture `type onWheelCapture = WheelEventHandler; ` ##### popover `type popover = "" | "auto" | "manual"; ` ##### popoverTarget `type popoverTarget = string; ` ##### popoverTargetAction `type popoverTargetAction = "toggle" | "hide" | "show"; ` ##### prefix `type prefix = string; ` ##### property `type property = string; ` ##### queryOptions Optional `useQuery` params `type queryOptions = Omit>, "queryKey" | "queryFn"> ` ##### radioGroup `type radioGroup = string; ` ##### rel `type rel = string; ` ##### resource `type resource = string; ` ##### results `type results = number; ` ##### rev `type rev = string; ` ##### role `type role = AriaRole; ` ##### security `type security = string; ` ##### slot `type slot = string; ` ##### spellCheck `type spellCheck = Booleanish; ` ##### style `type style = CSSProperties; ` ##### suppressContentEditableWarning `type suppressContentEditableWarning = boolean; ` ##### suppressHydrationWarning `type suppressHydrationWarning = boolean; ` ##### tabIndex `type tabIndex = number; ` ##### title `type title = string; ` ##### translate `type translate = "yes" | "no"; ` ##### typeof `type typeof = string ` ##### unselectable `type unselectable = "on" | "off"; ` ##### vocab `type vocab = string; `