<!--
Sitemap:
- [Why Viem](/docs/introduction): A brief preamble on why we built Viem
- [Installation](/docs/installation)
- [Getting Started](/docs/getting-started): Get started with viem in just a few lines of code.
- [Platform Compatibility](/docs/compatibility): Platforms compatible with Viem
- [Frequently Asked Questions](/docs/faq)
- [Migration Guide](/docs/migration-guide)
- [Ethers v5 → viem Migration Guide](/docs/ethers-migration): Migrate from Ethers v5 to viem
- [TypeScript](/docs/typescript): TypeScript support for Viem
- [Error Handling](/docs/error-handling)
- [EIP-7702 Overview](/docs/eip7702): An Overview of EIP-7702
- [Contract Writes with EIP-7702](/docs/eip7702/contract-writes)
- [Sending Transactions with EIP-7702](/docs/eip7702/sending-transactions)
- [Blob Transactions](/docs/guides/blob-transactions): Sending your first Blob Transaction with Viem.
- [Introduction to Clients & Transports](/docs/clients/intro): A brief introduction to Clients & Transports.
- [Public Client](/docs/clients/public): A function to create a Public Client
- [Wallet Client](/docs/clients/wallet): A function to create a Wallet Client.
- [Test Client](/docs/clients/test): A function to create a Test Client
- [Build your own Client](/docs/clients/custom)
- [HTTP Transport](/docs/clients/transports/http): A function to create a HTTP Transport for a Client
- [WebSocket Transport](/docs/clients/transports/websocket): A function to create a WebSocket Transport for a Client
- [Custom Transport](/docs/clients/transports/custom): A function to create a Custom Transport for a Client
- [IPC Transport](/docs/clients/transports/ipc): A function to create an IPC Transport for a Client
- [Fallback Transport](/docs/clients/transports/fallback): A function to create a Fallback Transport for a Client
- [Introduction to Public Actions](/docs/actions/public/introduction): A brief introduction on what Public Actions are in viem.
- [createAccessList](/docs/actions/public/createAccessList)
- [getBalance](/docs/actions/public/getBalance): Returns the balance of an address in wei.
- [getTransactionCount](/docs/actions/public/getTransactionCount): Returns the number of Transactions an Account has sent.
- [getBlock](/docs/actions/public/getBlock): Returns information about a block at a block number, hash or tag.
- [getBlockReceipts](/docs/actions/public/getBlockReceipts): Returns the transaction receipts of a block at a block number, hash or tag.
- [getBlockNumber](/docs/actions/public/getBlockNumber): Returns the number of the most recent block seen.
- [getBlockTransactionCount](/docs/actions/public/getBlockTransactionCount): Returns the number of Transactions at a block number, hash or tag.
- [simulateBlocks](/docs/actions/public/simulateBlocks): Simulates a set of calls on block(s).
- [watchBlockNumber](/docs/actions/public/watchBlockNumber): Watches and returns incoming block numbers.
- [watchBlocks](/docs/actions/public/watchBlocks): Watches and returns information for incoming blocks.
- [call](/docs/actions/public/call): An Action for executing a new message call.
- [simulateCalls](/docs/actions/public/simulateCalls): Simulates a set of calls on block(s).
- [getChainId](/docs/actions/public/getChainId): Returns the chain ID associated with the current network
- [getEip712Domain](/docs/actions/public/getEip712Domain): Reads the EIP-712 domain from a contract.
- [estimateFeesPerGas](/docs/actions/public/estimateFeesPerGas): Returns an estimate for the fees per gas (in wei) for a transaction to be likely included in the next block.
- [estimateGas](/docs/actions/public/estimateGas): An Action for estimating gas for a transaction.
- [estimateMaxPriorityFeePerGas](/docs/actions/public/estimateMaxPriorityFeePerGas): Returns an estimate for the max priority fee per gas (in wei) for a transaction to be likely included in the next block.
- [getBlobBaseFee](/docs/actions/public/getBlobBaseFee): Returns the current blob base fee (in wei).
- [getFeeHistory](/docs/actions/public/getFeeHistory): Returns a collection of historical gas information.
- [getGasPrice](/docs/actions/public/getGasPrice): Returns the current price of gas (in wei).
- [createBlockFilter](/docs/actions/public/createBlockFilter): An Action for creating a new Block Filter.
- [createEventFilter](/docs/actions/public/createEventFilter): An Action for creating a new Event Filter.
- [createPendingTransactionFilter](/docs/actions/public/createPendingTransactionFilter): An Action for creating a new pending transaction filter.
- [getFilterChanges](/docs/actions/public/getFilterChanges): Returns a list of logs or hashes based on a Filter.
- [getFilterLogs](/docs/actions/public/getFilterLogs): Returns a list of event logs since the filter was created.
- [getLogs](/docs/actions/public/getLogs): Returns a list of event logs matching the provided parameters.
- [watchEvent](/docs/actions/public/watchEvent): Watches and returns emitted Event Logs.
- [uninstallFilter](/docs/actions/public/uninstallFilter): Destroys a Filter.
- [getProof](/docs/actions/public/getProof): Returns the account and storage values of the specified account including the Merkle-proof.
- [verifyMessage](/docs/actions/public/verifyMessage): Verifies if a signed message was generated by the provided address.
- [verifyTypedData](/docs/actions/public/verifyTypedData): Verifies a typed data signature
- [prepareTransactionRequest](/docs/actions/wallet/prepareTransactionRequest): Prepares a transaction request for signing.
- [getTransaction](/docs/actions/public/getTransaction): Returns information about a transaction given a hash or block identifier.
- [getTransactionConfirmations](/docs/actions/public/getTransactionConfirmations): Returns the number of blocks passed (confirmations) since the transaction was processed on a block.
- [getTransactionReceipt](/docs/actions/public/getTransactionReceipt): Returns the transaction receipt given a transaction hash.
- [sendRawTransaction](/docs/actions/wallet/sendRawTransaction): Sends a signed transaction to the network
- [waitForTransactionReceipt](/docs/actions/public/waitForTransactionReceipt): Retrieves a Transaction Receipt for a given Transaction hash.
- [watchPendingTransactions](/docs/actions/public/watchPendingTransactions): Watches and returns pending transaction hashes.
- [Introduction to Wallet Actions](/docs/actions/wallet/introduction): A brief introduction to Wallet Actions in viem.
- [getAddresses](/docs/actions/wallet/getAddresses): Returns a list of addresses owned by the wallet or client.
- [requestAddresses](/docs/actions/wallet/requestAddresses): Requests a list of accounts managed by a wallet.
- [watchAsset](/docs/actions/wallet/watchAsset): Requests that the user tracks the token in their wallet.
- [getCallsStatus](/docs/actions/wallet/getCallsStatus): Returns the status of a call batch.
- [getCapabilities](/docs/actions/wallet/getCapabilities): Extract capabilities that a connected wallet supports.
- [sendCalls](/docs/actions/wallet/sendCalls): Sign and broadcast a batch of calls to the network.
- [sendCallsSync](/docs/actions/wallet/sendCallsSync): Sign and broadcast a batch of calls to the network, and waits for the calls to be included in a block.
- [showCallsStatus](/docs/actions/wallet/showCallsStatus): Requests for the wallet to show information about a call batch.
- [waitForCallsStatus](/docs/actions/wallet/waitForCallsStatus): Waits for a call batch to be confirmed & included on a Block.
- [addChain](/docs/actions/wallet/addChain): Adds an EVM chain to the wallet.
- [switchChain](/docs/actions/wallet/switchChain): Switch the target chain in a wallet.
- [signMessage](/docs/actions/wallet/signMessage): Signs a message with the Account's private key.
- [signTypedData](/docs/actions/wallet/signTypedData): Signs typed data with the Account's private key.
- [getPermissions](/docs/actions/wallet/getPermissions): Gets the wallets current permissions.
- [requestPermissions](/docs/actions/wallet/requestPermissions): Requests permissions for a wallet.
- [sendRawTransactionSync](/docs/actions/wallet/sendRawTransactionSync): Sends a signed transaction to the network synchronously
- [sendTransaction](/docs/actions/wallet/sendTransaction): Creates, signs, and sends a new transaction to the network.
- [sendTransactionSync](/docs/actions/wallet/sendTransactionSync): Creates, signs, and sends a new transaction to the network synchronously.
- [signTransaction](/docs/actions/wallet/signTransaction): Signs a transaction.
- [Introduction to Test Actions](/docs/actions/test/introduction): A brief introduction on what Test Actions are in viem.
- [impersonateAccount](/docs/actions/test/impersonateAccount): Impersonate an account or contract address.
- [setBalance](/docs/actions/test/setBalance): Modifies the balance of an account.
- [setCode](/docs/actions/test/setCode): Modifies the bytecode stored at an account's address.
- [setNonce](/docs/actions/test/setNonce): Modifies (overrides) the nonce of an account.
- [setStorageAt](/docs/actions/test/setStorageAt): Writes to a slot of an account's storage.
- [stopImpersonatingAccount](/docs/actions/test/stopImpersonatingAccount): Stop impersonating an account after having previously used impersonateAccount.
- [getAutomine](/docs/actions/test/getAutomine): Returns the automatic mining status of the node.
- [increaseTime](/docs/actions/test/increaseTime): Jump forward in time by the given amount of time, in seconds.
- [mine](/docs/actions/test/mine): Mine a specified number of blocks.
- [removeBlockTimestampInterval](/docs/actions/test/removeBlockTimestampInterval): Removes setBlockTimestampInterval if it exists.
- [setAutomine](/docs/actions/test/setAutomine): Enables or disables the automatic mining of new blocks with each new transaction submitted to the network.
- [setIntervalMining](/docs/actions/test/setIntervalMining): Sets the automatic mining interval (in seconds) of blocks.
- [setBlockTimestampInterval](/docs/actions/test/setBlockTimestampInterval): Sets the block's timestamp interval.
- [setBlockGasLimit](/docs/actions/test/setBlockGasLimit): Sets the block's gas limit.
- [setNextBlockBaseFeePerGas](/docs/actions/test/setNextBlockBaseFeePerGas): Sets the next block's base fee per gas.
- [setNextBlockTimestamp](/docs/actions/test/setNextBlockTimestamp): Sets the next block's timestamp.
- [setCoinbase](/docs/actions/test/setCoinbase): Sets the coinbase address to be used in new blocks.
- [setMinGasPrice](/docs/actions/test/setMinGasPrice): Change the minimum gas price accepted by the network (in wei).
- [reset](/docs/actions/test/reset): Resets the fork back to its original state.
- [setLoggingEnabled](/docs/actions/test/setLoggingEnabled): Enable or disable logging on the test node network.
- [setRpcUrl](/docs/actions/test/setRpcUrl): Sets the backend RPC URL.
- [dumpState](/docs/actions/test/dumpState): Serializes the current state into a savable data blob.
- [loadState](/docs/actions/test/loadState): Adds state previously dumped to the current chain.
- [revert](/docs/actions/test/revert): Revert the state of the blockchain at the current block.
- [snapshot](/docs/actions/test/snapshot): Snapshot the state of the blockchain at the current block.
- [dropTransaction](/docs/actions/test/dropTransaction): Removes a transaction from the mempool.
- [getTxpoolContent](/docs/actions/test/getTxpoolContent): Returns the details of all transactions currently pending for inclusion in the next block(s).
- [getTxpoolStatus](/docs/actions/test/getTxpoolStatus): Returns a summary of all the transactions currently pending for inclusion in the next block(s).
- [inspectTxpool](/docs/actions/test/inspectTxpool): Returns a summary of all the transactions currently pending for inclusion in the next block(s).
- [sendUnsignedTransaction](/docs/actions/test/sendUnsignedTransaction): Executes a transaction regardless of the signature.
- [JSON-RPC Account](/docs/accounts/jsonRpc): A function to create a JSON-RPC Account.
- [Local Accounts (Private Key, Mnemonic, etc)](/docs/accounts/local)
- [privateKeyToAccount](/docs/accounts/local/privateKeyToAccount): A function to create a Private Key Account.
- [mnemonicToAccount](/docs/accounts/local/mnemonicToAccount): A function to create a Mnemonic Account.
- [hdKeyToAccount](/docs/accounts/local/hdKeyToAccount): A function to create a Hierarchical Deterministic (HD) Account.
- [toAccount](/docs/accounts/local/toAccount): A function to create a Custom Account.
- [createNonceManager](/docs/accounts/local/createNonceManager): Creates a Nonce Manager for automatic nonce generation
- [signMessage (Local Account)](/docs/accounts/local/signMessage): Signs a message with the Account's private key.
- [signTransaction (Local Account)](/docs/accounts/local/signTransaction): Signs a transaction with the Account's private key.
- [signTypedData (Local Account)](/docs/accounts/local/signTypedData): Signs typed data with the Account's private key.
- [Chains](/docs/chains/introduction)
- [Fees](/docs/chains/fees): Configure chain-based fee data in Viem
- [Formatters](/docs/chains/formatters): Configure chain-based formatters in Viem
- [Serializers](/docs/chains/serializers): Configure chain-based serializers in Viem
- [Celo](/docs/chains/celo): Integrating with Celo in Viem
- [Getting Started with OP Stack](/op-stack): Getting started with the OP Stack in Viem
- [Getting Started with ZKsync](/zksync): Getting started with the ZKsync in Viem
- [Contract Instances](/docs/contract/getContract): A Contract Instance is a type-safe interface for performing contract-related actions with a specific ABI and address, created by the getContract function.
- [createContractEventFilter](/docs/contract/createContractEventFilter): Creates a Filter to retrieve contract event logs.
- [deployContract](/docs/contract/deployContract): Deploys a contract to the network, given bytecode & constructor arguments.
- [estimateContractGas](/docs/contract/estimateContractGas): Estimates the gas required to successfully execute a contract write function call.
- [getCode](/docs/contract/getCode): Retrieves the bytecode at an address.
- [getContractEvents](/docs/contract/getContractEvents): Returns a list of event logs matching the provided parameters.
- [getStorageAt](/docs/contract/getStorageAt): Returns the value from a storage slot at a given address.
- [multicall](/docs/contract/multicall): Batches up multiple functions on a contract in a single call.
- [readContract](/docs/contract/readContract): Calls a read-only function on a contract, and returns the response.
- [simulateContract](/docs/contract/simulateContract): Simulates & validates a contract interaction.
- [writeContract](/docs/contract/writeContract): Executes a write function on a contract.
- [writeContractSync](/docs/contract/writeContractSync): Executes a write function on a contract synchronously.
- [watchContractEvent](/docs/contract/watchContractEvent): Watches and returns emitted contract event logs.
- [decodeDeployData](/docs/contract/decodeDeployData): Decodes ABI encoded deploy data (bytecode & arguments).
- [decodeErrorResult](/docs/contract/decodeErrorResult): Decodes reverted error from a contract function call.
- [decodeEventLog](/docs/contract/decodeEventLog): Decodes ABI encoded event topics & data.
- [decodeFunctionData](/docs/contract/decodeFunctionData): Decodes ABI encoded data (4 byte selector & arguments) into a function name and arguments.
- [decodeFunctionResult](/docs/contract/decodeFunctionResult): Decodes the result of a function call on a contract.
- [encodeDeployData](/docs/contract/encodeDeployData): Encodes deploy data (bytecode & constructor args) into an ABI encoded value.
- [encodeErrorResult](/docs/contract/encodeErrorResult): Encodes a reverted error from a function call.
- [encodeEventTopics](/docs/contract/encodeEventTopics): Encodes an event (with optional arguments) into filter topics.
- [encodeFunctionData](/docs/contract/encodeFunctionData): Encodes the function name and parameters into an ABI encoded value (4 byte selector & arguments).
- [encodeFunctionResult](/docs/contract/encodeFunctionResult): Encodes structured return data into ABI encoded data.
- [parseEventLogs](/docs/contract/parseEventLogs): Extracts & decodes logs from a set of opaque logs.
- [getEnsAddress](/docs/ens/actions/getEnsAddress): Gets address for ENS name.
- [getEnsAvatar](/docs/ens/actions/getEnsAvatar): Gets the avatar of an ENS name.
- [getEnsName](/docs/ens/actions/getEnsName): Gets primary name for specified address.
- [getEnsResolver](/docs/ens/actions/getEnsResolver): Gets resolver for ENS name.
- [getEnsText](/docs/ens/actions/getEnsText): Gets a text record for specified ENS name.
- [labelhash](/docs/ens/utilities/labelhash): Hashes ENS label.
- [namehash](/docs/ens/utilities/namehash): Hashes ENS name.
- [normalize](/docs/ens/utilities/normalize): Normalizes ENS name to UTS46.
- [verifySiweMessage](/docs/siwe/actions/verifySiweMessage): Verifies EIP-4361 formatted message was signed.
- [createSiweMessage](/docs/siwe/utilities/createSiweMessage): Creates EIP-4361 formatted message.
- [generateSiweNonce](/docs/siwe/utilities/generateSiweNonce): Generates random EIP-4361 nonce.
- [parseSiweMessage](/docs/siwe/utilities/parseSiweMessage): Parses EIP-4361 formatted message into message fields object.
- [validateSiweMessage](/docs/siwe/utilities/validateSiweMessage): Validates EIP-4361 message.
- [decodeAbiParameters](/docs/abi/decodeAbiParameters): Decodes ABI encoded data.
- [encodeAbiParameters](/docs/abi/encodeAbiParameters): Generates ABI encoded data.
- [encodePacked](/docs/abi/encodePacked): Generates ABI encoded data.
- [getAbiItem](/docs/abi/getAbiItem): Retrieves an item from the ABI array.
- [parseAbi](/docs/abi/parseAbi): Parses human-readable ABI into JSON.
- [parseAbiItem](/docs/abi/parseAbiItem): Parses human-readable ABI item (e.g. error, event, function) into ABI item.
- [parseAbiParameter](/docs/abi/parseAbiParameter): Parses human-readable ABI parameter into ABI parameter.
- [parseAbiParameters](/docs/abi/parseAbiParameters): Parses human-readable ABI parameters into ABI parameters.
- [getDelegation](/docs/eip7702/getDelegation): Returns the address an account has delegated to via EIP-7702.
- [prepareAuthorization](/docs/eip7702/prepareAuthorization): Prepares an EIP-7702 Authorization for signing.
- [signAuthorization](/docs/eip7702/signAuthorization): Signs an EIP-7702 Authorization object.
- [hashAuthorization](/docs/eip7702/hashAuthorization): Calculates an Authorization object hash in EIP-7702 format.
- [recoverAuthorizationAddress](/docs/eip7702/recoverAuthorizationAddress): Recovers the original signing address from a signed Authorization object.
- [verifyAuthorization](/docs/eip7702/verifyAuthorization): Verifies that an Authorization object was signed by the provided address.
- [getAddress](/docs/utilities/getAddress): Converts an address into an address that is checksum encoded.
- [getContractAddress](/docs/utilities/getContractAddress): Retrieves a contract address.
- [isAddress](/docs/utilities/isAddress): Checks if the address is valid.
- [isAddressEqual](/docs/utilities/isAddressEqual): Checks if the given addresses (checksummed) are equal.
- [blobsToProofs](/docs/utilities/blobsToProofs): Compute the proofs for a list of blobs and their commitments.
- [blobsToCommitments](/docs/utilities/blobsToCommitments): Compute commitments from a list of blobs.
- [commitmentsToVersionedHashes](/docs/utilities/commitmentsToVersionedHashes): Transform a list of commitments to their versioned hashes.
- [commitmentToVersionedHash](/docs/utilities/commitmentToVersionedHash): Transform a commitment to it's versioned hash.
- [fromBlobs](/docs/utilities/fromBlobs): Transforms blobs into the originating data.
- [sidecarsToVersionedHashes](/docs/utilities/sidecarsToVersionedHashes): Transforms a list of sidecars to their versioned hashes.
- [toBlobs](/docs/utilities/toBlobs): Transforms arbitrary data into blobs.
- [toBlobSidecars](/docs/utilities/toBlobSidecars): Transforms arbitrary data into blob sidecars.
- [extractChain](/docs/utilities/extractChain)
- [concat](/docs/utilities/concat): Concatenates a set of hex values or byte arrays.
- [isBytes](/docs/utilities/isBytes): Checks whether the value is a byte array or not.
- [isHex](/docs/utilities/isHex): Checks whether the value is a hex value or not.
- [pad](/docs/utilities/pad): Pads a hex value or byte array with leading or trailing zeros.
- [slice](/docs/utilities/slice): Returns a section of the hex or byte array given a start/end bytes offset.
- [size](/docs/utilities/size): Retrieves the size of the value (in bytes).
- [trim](/docs/utilities/trim): Trims the leading or trailing zero byte data from a hex value or byte array.
- [fromBytes](/docs/utilities/fromBytes): Decodes a byte array to a string, hex value, boolean or number.
- [fromHex](/docs/utilities/fromHex): Decodes a hex value to a string, number or byte array.
- [fromRlp](/docs/utilities/fromRlp): Decodes a RLP value into a decoded hex value or byte array.
- [toBytes](/docs/utilities/toBytes): Encodes a string, hex value, number or boolean to a byte array.
- [toHex](/docs/utilities/toHex): Encodes a string, number, boolean or byte array to a hex value.
- [toRlp](/docs/utilities/toRlp): Encodes a hex value or byte array into a RLP encoded value.
- [isHash](/docs/utilities/isHash): Checks if a string is a valid 32-byte hex hash.
- [keccak256](/docs/utilities/keccak256): Calculates the Keccak256 hash of a byte array.
- [ripemd160](/docs/utilities/ripemd160): Calculates the Ripemd160 hash of a byte array.
- [sha256](/docs/utilities/sha256): Calculates the Sha256 hash of a byte array.
- [toEventHash](/docs/utilities/toEventHash): Returns the hash (of the event signature) for a given event definition.
- [toEventSelector](/docs/utilities/toEventSelector): Returns the event selector for a given event definition.
- [toEventSignature](/docs/utilities/toEventSignature): Returns the signature for a given event or event definition.
- [toFunctionHash](/docs/utilities/toFunctionHash): Returns the hash (of the function signature) for a given function definition.
- [toFunctionSelector](/docs/utilities/toFunctionSelector): Returns the function selector (4 byte encoding) for a given function definition.
- [toFunctionSignature](/docs/utilities/toFunctionSignature): Returns the signature for a given function definition.
- [setupKzg](/docs/utilities/setupKzg): Sets up and returns a KZG interface.
- [compactSignatureToSignature](/docs/utilities/compactSignatureToSignature): Parses a compact signature into signature format.
- [hashMessage](/docs/utilities/hashMessage): Hashes a message in EIP-191 format.
- [hashTypedData](/docs/utilities/hashTypedData): Hashes EIP-712 typed data.
- [isErc6492Signature](/docs/utilities/isErc6492Signature): Checks whether the signature is in ERC-6492 format.
- [parseCompactSignature](/docs/utilities/parseCompactSignature): Parses a hex formatted compact signature into a structured compact signature.
- [parseErc6492Signature](/docs/utilities/parseErc6492Signature): Parses a hex-formatted ERC-6492 flavoured signature.
- [parseSignature](/docs/utilities/parseSignature): Parses a hex formatted signature into a structured signature.
- [recoverAddress](/docs/utilities/recoverAddress): Recovers the signing address from a hash & signature.
- [recoverMessageAddress](/docs/utilities/recoverMessageAddress): Recovers the signing address from a message & signature.
- [recoverPublicKey](/docs/utilities/recoverPublicKey): Recovers the signing public key from a hash & signature.
- [recoverTransactionAddress](/docs/utilities/recoverTransactionAddress): Recovers the signing address from a transaction & signature.
- [recoverTypedDataAddress](/docs/utilities/recoverTypedDataAddress): Recovers the signing address from EIP-712 typed data & signature.
- [serializeCompactSignature](/docs/utilities/serializeCompactSignature): Serializes a compact signature into hex format.
- [serializeErc6492Signature](/docs/utilities/serializeErc6492Signature): Serializes a ERC-6492 flavoured signature into hex format.
- [serializeSignature](/docs/utilities/serializeSignature): Serializes a structured signature into hex format.
- [signatureToCompactSignature](/docs/utilities/signatureToCompactSignature): Parses a signature into a compact signature.
- [verifyMessage](/docs/utilities/verifyMessage): Verifies if a signed message was generated by the provided address.
- [verifyTypedData](/docs/utilities/verifyTypedData): Verifies a typed data signature
- [parseTransaction](/docs/utilities/parseTransaction): Converts a serialized transaction to a structured transaction.
- [serializeTransaction](/docs/utilities/serializeTransaction): Serializes a transaction object.
- [formatEther](/docs/utilities/formatEther): Converts numerical wei to a string representation of ether.
- [formatGwei](/docs/utilities/formatGwei): Converts numerical wei to a string representation of gwei.
- [formatUnits](/docs/utilities/formatUnits): Divides a number by a given exponent of base 10, and formats it into a string representation of the number.
- [parseEther](/docs/utilities/parseEther): Converts a string representation of ether to numerical wei.
- [parseGwei](/docs/utilities/parseGwei): Converts a string representation of gwei to numerical wei.
- [parseUnits](/docs/utilities/parseUnits): Multiplies a string representation of a number by a given exponent of base 10.
- [Terms](/docs/glossary/terms): Glossary of Terms in viem.
- [Types](/docs/glossary/types): Glossary of Types in viem.
- [Errors](/docs/glossary/errors): Glossary of Errors in viem.
- [Getting Started with Account Abstraction](/account-abstraction): Getting Started with Account Abstraction in Viem
- [Sending User Operations](/account-abstraction/guides/sending-user-operations)
- [Bundler Client](/account-abstraction/clients/bundler): A function to create a Bundler Client.
- [Paymaster Client](/account-abstraction/clients/paymaster): A function to create a Paymaster Client.
- [Smart Accounts](/account-abstraction/accounts/smart)
- [Coinbase Smart Wallet](/account-abstraction/accounts/smart/toCoinbaseSmartAccount)
- [MetaMask Smart Account](/account-abstraction/accounts/smart/toMetaMaskSmartAccount)
- [Thirdweb Smart Account](/account-abstraction/accounts/smart/toThirdwebSmartAccount)
- [Nexus Smart Account](/account-abstraction/accounts/smart/toNexusSmartAccount)
- [Light Smart Account](/account-abstraction/accounts/smart/toLightSmartAccount)
- [Kernel (ZeroDev) Smart Account](/account-abstraction/accounts/smart/toEcdsaKernelSmartAccount)
- [Safe Smart Account](/account-abstraction/accounts/smart/toSafeSmartAccount)
- [Simple Smart Account](/account-abstraction/accounts/smart/toSimpleSmartAccount)
- [Solady Smart Account](/account-abstraction/accounts/smart/toSoladySmartAccount)
- [Trust Smart Account](/account-abstraction/accounts/smart/toTrustSmartAccount)
- [toSmartAccount](/account-abstraction/accounts/smart/toSmartAccount): Creates a Smart Account with a provided Account Implementation.
- [signMessage (Smart Account)](/account-abstraction/accounts/smart/signMessage)
- [signTypedData (Smart Account)](/account-abstraction/accounts/smart/signTypedData)
- [signUserOperation (Smart Account)](/account-abstraction/accounts/smart/signUserOperation)
- [WebAuthn Account](/account-abstraction/accounts/webauthn)
- [toWebAuthnAccount](/account-abstraction/accounts/webauthn/toWebAuthnAccount)
- [createWebAuthnCredential](/account-abstraction/accounts/webauthn/createWebAuthnCredential)
- [estimateUserOperationGas](/account-abstraction/actions/bundler/estimateUserOperationGas): Estimates the gas values for a User Operation to be executed successfully.
- [getChainId](/account-abstraction/actions/bundler/getChainId): Returns the chain ID associated with the bundler
- [getSupportedEntryPoints](/account-abstraction/actions/bundler/getSupportedEntryPoints): Returns the EntryPoints that the bundler supports.
- [getUserOperation](/account-abstraction/actions/bundler/getUserOperation): Retrieves information about a User Operation given a hash.
- [getUserOperationReceipt](/account-abstraction/actions/bundler/getUserOperationReceipt): Returns the User Operation receipt given a User Operation hash.
- [prepareUserOperation](/account-abstraction/actions/bundler/prepareUserOperation): Prepares a User Operation for execution and fills in missing properties.
- [sendUserOperation](/account-abstraction/actions/bundler/sendUserOperation): Broadcasts a User Operation to the Bundler.
- [waitForUserOperationReceipt](/account-abstraction/actions/bundler/waitForUserOperationReceipt): Waits for the User Operation to be included on a Block, and then returns the User Operation receipt.
- [getPaymasterData](/account-abstraction/actions/paymaster/getPaymasterData): Retrieves paymaster-related properties to be used for the User Operation.
- [getPaymasterStubData](/account-abstraction/actions/paymaster/getPaymasterStubData): Retrieves paymaster-related properties to be used for the User Operation.
- [Getting Started](/experimental): Getting started with experimental features in Viem
- [Extending Client with ERC-7715](/experimental/erc7715/client): Setting up your Viem Client
- [grantPermissions](/experimental/erc7715/grantPermissions): Request permissions from a wallet to perform actions on behalf of a user.
- [Extending Client with ERC-7739 Actions](/experimental/erc7739/client): Setting up your Viem Client
- [signMessage](/experimental/erc7739/signMessage): Signs a personal sign message via Solady's ERC-1271 format.
- [signTypedData](/experimental/erc7739/signTypedData): Signs typed data via Solady's ERC-1271 format.
- [hashMessage](/experimental/erc7739/hashMessage): Hashes an EIP-191 message via ERC-7739 format.
- [hashTypedData](/experimental/erc7739/hashTypedData): Hashes EIP-712 typed data via Solady's ERC-1271 format.
- [wrapTypedDataSignature](/experimental/erc7739/wrapTypedDataSignature)
- [Extending Client with ERC-7811 Actions](/experimental/erc7811/client): Setting up your Viem Client
- [getAssets](/experimental/erc7811/getAssets): Requests to get assets for an account from a Wallet.
- [Extending Client with ERC-7821 Actions](/experimental/erc7821/client): Setting up your Viem Client
- [execute](/experimental/erc7821/execute): Executes call(s) using the `execute` function on an ERC-7821-compatible contract.
- [executeBatches](/experimental/erc7821/executeBatches): Executes batches of call(s) on an ERC-7821-compatible contract.
- [supportsExecutionMode](/experimental/erc7821/supportsExecutionMode): Checks if the contract supports the ERC-7821 execution mode.
- [Extending Client with ERC-7846 Actions](/experimental/erc7846/client): Setting up your Viem Client
- [connect](/experimental/erc7846/connect): Requests to connect Account(s).
- [disconnect](/experimental/erc7846/disconnect): Requests to disconnect account(s).
- [Extending Client with ERC-7895 Actions](/experimental/erc7895/client): Setting up your Viem Client
- [addSubAccount](/experimental/erc7895/addSubAccount): Requests to add a Sub Account.
- [Client](/op-stack/client): Setting up your Viem Client with the OP Stack
- [Chains](/op-stack/chains)
- [Deposits](/op-stack/guides/deposits)
- [Withdrawals](/op-stack/guides/withdrawals)
- [buildDepositTransaction](/op-stack/actions/buildDepositTransaction): Builds & prepares parameters for a deposit transaction to be initiated on an L1 and executed on the L2.
- [buildProveWithdrawal](/op-stack/actions/buildProveWithdrawal): Builds the transaction that proves a withdrawal was initiated on an L2.
- [estimateContractL1Fee](/op-stack/actions/estimateContractL1Fee): Estimates the L1 fee to execute an L2 contract write.
- [estimateContractL1Gas](/op-stack/actions/estimateContractL1Gas): Estimates the L1 gas to execute an L2 contract write.
- [estimateContractTotalFee](/op-stack/actions/estimateContractTotalFee): Estimates the total (L1 + L2) fee to execute an L2 contract write.
- [estimateContractTotalGas](/op-stack/actions/estimateContractTotalGas): Estimates the total (L1 + L2) gas to execute an L2 contract write.
- [estimateInitiateWithdrawalGas](/op-stack/actions/estimateInitiateWithdrawalGas): Estimates gas required to initiate a withdrawal on an L2 to the L1.
- [estimateL1Fee](/op-stack/actions/estimateL1Fee): Estimates the L1 fee to execute an L2 transaction.
- [estimateL1Gas](/op-stack/actions/estimateL1Gas): Estimates the amount of L1 gas required to execute an L2 transaction
- [estimateOperatorFee](/op-stack/actions/estimateOperatorFee): Estimates the operator fee to execute an L2 transaction.
- [estimateTotalFee](/op-stack/actions/estimateTotalFee): Estimates the L1 + L2 + operator fee to execute an L2 transaction.
- [estimateTotalGas](/op-stack/actions/estimateTotalGas): Estimates the amount of L1 + L2 gas required to execute an L2 transaction
- [initiateWithdrawal](/op-stack/actions/initiateWithdrawal): Initiates a withdrawal on an L2 to the L1.
- [buildInitiateWithdrawal](/op-stack/actions/buildInitiateWithdrawal): Builds & prepares parameters for a withdrawal to be initiated on an L2.
- [estimateDepositTransactionGas](/op-stack/actions/estimateDepositTransactionGas): Estimates gas to initiate a deposit transaction on an L1, which executes a transaction on an L2.
- [estimateFinalizeWithdrawalGas](/op-stack/actions/estimateFinalizeWithdrawalGas): Estimates gas required to finalize a withdrawal that occurred on an L2.
- [estimateProveWithdrawalGas](/op-stack/actions/estimateProveWithdrawalGas): Estimates gas required to prove a withdrawal that occurred on an L2.
- [getGame](/op-stack/actions/getGame): Retrieves a valid dispute game on an L2 that occurred after a provided L2 block number.
- [getGames](/op-stack/actions/getGames): Retrieves dispute games for an L2.
- [getL2Output](/op-stack/actions/getL2Output): Retrieves the first L2 output proposal that occurred after a provided block number.
- [getTimeToFinalize](/op-stack/actions/getTimeToFinalize): Returns the time until the withdrawal transaction can be finalized.
- [getTimeToNextGame](/op-stack/actions/getTimeToNextGame): Returns the time until the next L2 dispute game is submitted.
- [getTimeToNextL2Output](/op-stack/actions/getTimeToNextL2Output): Builds & prepares parameters for a withdrawal to be initiated on an L2.
- [getTimeToProve](/op-stack/actions/getTimeToProve): Gets time until the L2 withdrawal transaction is ready to be proved.
- [getWithdrawalStatus](/op-stack/actions/getWithdrawalStatus): Returns the current status of a withdrawal.
- [waitForNextGame](/op-stack/actions/waitForNextGame): Waits for the next dispute game to be submitted.
- [waitForNextL2Output](/op-stack/actions/waitForNextL2Output): Waits for the next L2 output (after the provided block number) to be submitted.
- [waitToFinalize](/op-stack/actions/waitToFinalize): Waits until the withdrawal transaction can be finalized.
- [waitToProve](/op-stack/actions/waitToProve): Waits until the L2 withdrawal transaction is ready to be proved.
- [depositTransaction](/op-stack/actions/depositTransaction): Initiates a deposit transaction on an L1, which executes a transaction on an L2.
- [finalizeWithdrawal](/op-stack/actions/finalizeWithdrawal): Finalizes a withdrawal that occurred on an L2.
- [proveWithdrawal](/op-stack/actions/proveWithdrawal): Proves a withdrawal that occurred on an L2.
- [extractTransactionDepositedLogs](/op-stack/utilities/extractTransactionDepositedLogs): Extracts "TransactionDeposited" logs from an opaque array of logs.
- [extractWithdrawalMessageLogs](/op-stack/utilities/extractWithdrawalMessageLogs): Extracts "MessagePassed" logs from a withdrawal initialization from an opaque array of logs.
- [getL2TransactionHash](/op-stack/utilities/getL2TransactionHash): Computes the L2 transaction hash from an L1 "TransactionDeposited" log.
- [getL2TransactionHashes](/op-stack/utilities/getL2TransactionHashes): Computes the L2 transaction hashes from an array of L1 "TransactionDeposited" logs.
- [getWithdrawals](/op-stack/utilities/getWithdrawals): Gets the messages from a withdrawal initialization.
- [getSourceHash](/op-stack/utilities/getSourceHash): Computes source hash of a deposit transaction.
- [opaqueDataToDepositData](/op-stack/utilities/opaqueDataToDepositData): Converts opaque data into a structured deposit data format.
- [getWithdrawalHashStorageSlot](/op-stack/utilities/getWithdrawalHashStorageSlot): Computes the withdrawal hash storage slot to be used when proving a withdrawal.
- [parseTransaction (OP Stack)](/op-stack/utilities/parseTransaction): Converts a serialized transaction to a structured transaction, with support for OP Stack.
- [serializeTransaction (OP Stack)](/op-stack/utilities/serializeTransaction): Serializes a transaction object, with support for OP Stack.
- [USDC (Circle)](/circle-usdc)
- [Integrating USDC into Your Application](/circle-usdc/guides/integrating)
- [Cross-Chain USDC Transfers](/circle-usdc/guides/cross-chain)
- [Cross Chain USDC Transfers with Bridge Kit](/circle-usdc/guides/bridge-kit)
- [Cross Chain USDC Transfers (CCTP Integration)](/circle-usdc/guides/manual-cctp)
- [Gasless USDC Transfers with Circle Paymaster](/circle-usdc/guides/paymaster)
- [Circle Smart Account](/circle-usdc/guides/smart-account)
- [Getting Started](/tempo/)
- [Chains](/tempo/chains)
- [Guides](/tempo/guides/): Task-oriented guides for building common Tempo features with Viem.
- [Create an Account](/tempo/guides/accounts/create): Create a Tempo Account from a private key, passkey, or device-bound key, and use it with a Viem client.
- [Sign In with a Passkey](/tempo/guides/accounts/passkeys): Create and restore WebAuthn passkey accounts for non-custodial browser sign-in on Tempo.
- [Use the Tempo Accounts SDK](/tempo/guides/accounts/accounts-sdk): Connect a Tempo account with the Tempo Accounts SDK and drive it with Viem and Tempo Actions.
- [Tempo Transactions](/tempo/transactions): Send your first Tempo Transaction with Viem, and discover the payment-native features they unlock.
- [Batch Calls](/tempo/guides/batch-calls): Bundle multiple operations into a single atomic Tempo Transaction.
- [Concurrent Transactions](/tempo/guides/concurrent-transactions): Send multiple Tempo Transactions in parallel using concurrent nonces.
- [Scheduled Transactions](/tempo/guides/scheduled-transactions): Sign a Tempo Transaction now and define when it can execute onchain.
- [Pay Fees in a Stablecoin](/tempo/guides/pay-fees): Pay Tempo transaction fees in any USD-denominated TIP-20 stablecoin.
- [Sponsor User Fees](/tempo/guides/sponsor-fees): Sponsor transaction fees on behalf of your users for a gasless experience on Tempo.
- [Multisig Transactions](/tempo/guides/multisig-transactions): Send a Tempo Transaction from a native multisig account by collecting owner approvals.
- [Create a TIP-20 Token](/tempo/guides/create-token): Deploy a TIP-20 stablecoin on Tempo and read its onchain metadata.
- [Mint & Burn Tokens](/tempo/guides/manage-token-balances): Mint and burn TIP-20 token supply on Tempo.
- [Transfer Tokens](/tempo/guides/transfer-tokens): Transfer TIP-20 tokens, authorize spenders, and read balances on Tempo.
- [Manage Token Roles & Supply](/tempo/guides/manage-token-roles): Grant and revoke TIP-20 roles, cap supply, and pause transfers on Tempo.
- [Configure Transfer Policies](/tempo/guides/transfer-policies): Restrict which accounts can send or receive a TIP-20 token with a transfer policy.
- [Distribute Token Rewards](/tempo/guides/token-rewards): Distribute rewards to TIP-20 holders and let them claim their share on Tempo.
- [Access Keys](/tempo/guides/access-keys/): Delegate signing to a secondary key with access keys, with spending limits, scopes, admin keys, and signature verification.
- [Authorize Access Keys](/tempo/guides/access-keys/authorize): Authorize an access key to sign transactions on behalf of an account, and defer authorization to a transaction.
- [Set Permissions & Limits](/tempo/guides/access-keys/permissions): Restrict an access key with an expiry, per-token spending limits, recurring limits, and call scopes.
- [Manage Access Keys](/tempo/guides/access-keys/manage): Update spending limits, revoke access keys, and inspect their onchain metadata and remaining limits.
- [Admin Access Keys](/tempo/guides/access-keys/admin): Authorize unrestricted admin access keys that can manage an account's other keys, and check admin status.
- [Witnesses](/tempo/guides/access-keys/witnesses): Bind a witness to a key authorization and burn it to revoke signed-but-not-yet-submitted authorizations.
- [Verify Signatures](/tempo/guides/access-keys/verify): Verify that a keychain signature was produced by an active access key for the expected account.
- [Stablecoin Exchange](/tempo/guides/stablecoin-exchange/): Trade stablecoins on Tempo's enshrined DEX, manage orders and balances, create trading pairs, and provide Fee AMM liquidity.
- [Swap Stablecoins](/tempo/guides/stablecoin-exchange/swap): Quote and swap one USD-denominated TIP-20 stablecoin for another on Tempo's enshrined DEX.
- [Place & Manage Orders](/tempo/guides/stablecoin-exchange/orders): Place limit and flip orders on Tempo's Stablecoin DEX, then read, inspect, and cancel them.
- [Manage Exchange Balances](/tempo/guides/stablecoin-exchange/balances): Read your internal Stablecoin DEX balances and withdraw them back to your Tempo wallet.
- [Create a Trading Pair](/tempo/guides/stablecoin-exchange/create-pair): Create a new trading pair on Tempo's Stablecoin DEX and configure a token's quote token.
- [Provide Fee AMM Liquidity](/tempo/guides/stablecoin-exchange/fee-amm-liquidity): Add and remove liquidity in Tempo's Fee AMM so stablecoin fee conversions can settle.
- [Virtual Addresses](/tempo/guides/virtual-addresses/): Register a master address and accept TIP-20 deposits at unlimited virtual addresses that forward to you without sweeps.
- [Register a Master Address](/tempo/guides/virtual-addresses/register): Mine a TIP-1022 proof-of-work salt and register a master address for virtual-address deposit forwarding.
- [Resolve & Accept Payments](/tempo/guides/virtual-addresses/resolve): Derive per-customer virtual deposit addresses offchain and resolve them to your master wallet.
- [Receive Policies](/tempo/guides/receive-policies/): Control who can pay you on Tempo with receive policies, validate inbound transfers, and recover blocked funds.
- [Set a Receive Policy](/tempo/guides/receive-policies/set): Set and read an account's receive policy to control which senders and tokens it accepts.
- [Validate Transfers](/tempo/guides/receive-policies/validate): Check whether a TIP-20 transfer would be accepted by a recipient's receive policy before sending it.
- [Handle Blocked Funds](/tempo/guides/receive-policies/blocked): Read, claim, and burn TIP-20 funds that a receive policy blocked from being credited.
- [Payment Channels](/tempo/guides/payment-channels/): Open funded TIP-20 channels on Tempo, stream off-chain vouchers, and settle or close to move funds onchain.
- [Open & Fund a Channel](/tempo/guides/payment-channels/open): Open and fund a TIP-20 payment channel on Tempo, top it up, and read its onchain state.
- [Send & Settle Vouchers](/tempo/guides/payment-channels/vouchers): Sign off-chain TIP-20 channel vouchers as the payer and settle them onchain as the payee.
- [Close & Withdraw](/tempo/guides/payment-channels/close): Close a TIP-20 payment channel from either side and withdraw the remaining deposit on Tempo.
- [Private Zones](/tempo/guides/zones/): Connect to private Tempo Zones, deposit funds into them, and withdraw back to Tempo Mainnet.
- [Connect to a Zone](/tempo/guides/zones/connect): Connect a Viem client to a private Tempo Zone and authenticate with an authorization token.
- [Deposit to a Zone](/tempo/guides/zones/deposit): Deposit TIP-20 stablecoins from Tempo Mainnet into a private Tempo Zone.
- [Withdraw from a Zone](/tempo/guides/zones/withdraw): Withdraw TIP-20 stablecoins from a private Tempo Zone back to Tempo Mainnet.
- [Accounts](/tempo/accounts/)
- [Account.fromSecp256k1](/tempo/accounts/account.fromSecp256k1)
- [Account.fromP256](/tempo/accounts/account.fromP256)
- [Account.fromWebAuthnP256](/tempo/accounts/account.fromWebAuthnP256)
- [Account.fromWebCryptoP256](/tempo/accounts/account.fromWebCryptoP256)
- [Account.fromMultisig](/tempo/accounts/account.fromMultisig)
- [Overview](/tempo/actions/)
- [accessKey.authorize](/tempo/actions/accessKey.authorize)
- [accessKey.burnWitness](/tempo/actions/accessKey.burnWitness)
- [accessKey.getMetadata](/tempo/actions/accessKey.getMetadata)
- [accessKey.getRemainingLimit](/tempo/actions/accessKey.getRemainingLimit)
- [accessKey.isAdmin](/tempo/actions/accessKey.isAdmin)
- [accessKey.isWitnessBurned](/tempo/actions/accessKey.isWitnessBurned)
- [accessKey.revoke](/tempo/actions/accessKey.revoke)
- [accessKey.signAuthorization](/tempo/actions/accessKey.signAuthorization)
- [accessKey.updateLimit](/tempo/actions/accessKey.updateLimit)
- [accessKey.verifyHash](/tempo/actions/accessKey.verifyHash)
- [accessKey.watchAdminAuthorized](/tempo/actions/accessKey.watchAdminAuthorized)
- [accessKey.watchWitness](/tempo/actions/accessKey.watchWitness)
- [accessKey.watchWitnessBurned](/tempo/actions/accessKey.watchWitnessBurned)
- [amm.burn](/tempo/actions/amm.burn)
- [amm.getLiquidityBalance](/tempo/actions/amm.getLiquidityBalance)
- [amm.getPool](/tempo/actions/amm.getPool)
- [amm.mint](/tempo/actions/amm.mint)
- [amm.rebalanceSwap](/tempo/actions/amm.rebalanceSwap)
- [amm.watchBurn](/tempo/actions/amm.watchBurn)
- [amm.watchMint](/tempo/actions/amm.watchMint)
- [amm.watchRebalanceSwap](/tempo/actions/amm.watchRebalanceSwap)
- [channel.close](/tempo/actions/channel.close)
- [channel.getStates](/tempo/actions/channel.getStates)
- [channel.open](/tempo/actions/channel.open)
- [channel.requestClose](/tempo/actions/channel.requestClose)
- [channel.settle](/tempo/actions/channel.settle)
- [channel.signVoucher](/tempo/actions/channel.signVoucher)
- [channel.topUp](/tempo/actions/channel.topUp)
- [channel.withdraw](/tempo/actions/channel.withdraw)
- [fee.getUserToken](/tempo/actions/fee.getUserToken)
- [fee.setUserToken](/tempo/actions/fee.setUserToken)
- [fee.watchSetUserToken](/tempo/actions/fee.watchSetUserToken)
- [nonce.getNonce](/tempo/actions/nonce.getNonce)
- [nonce.watchNonceIncremented](/tempo/actions/nonce.watchNonceIncremented)
- [policy.create](/tempo/actions/policy.create)
- [policy.getData](/tempo/actions/policy.getData)
- [policy.isAuthorized](/tempo/actions/policy.isAuthorized)
- [policy.modifyBlacklist](/tempo/actions/policy.modifyBlacklist)
- [policy.modifyWhitelist](/tempo/actions/policy.modifyWhitelist)
- [policy.setAdmin](/tempo/actions/policy.setAdmin)
- [policy.watchAdminUpdated](/tempo/actions/policy.watchAdminUpdated)
- [policy.watchBlacklistUpdated](/tempo/actions/policy.watchBlacklistUpdated)
- [policy.watchCreate](/tempo/actions/policy.watchCreate)
- [policy.watchWhitelistUpdated](/tempo/actions/policy.watchWhitelistUpdated)
- [receivePolicy.burn](/tempo/actions/receivePolicy.burn)
- [receivePolicy.claim](/tempo/actions/receivePolicy.claim)
- [receivePolicy.get](/tempo/actions/receivePolicy.get)
- [receivePolicy.getBlockedBalance](/tempo/actions/receivePolicy.getBlockedBalance)
- [receivePolicy.set](/tempo/actions/receivePolicy.set)
- [receivePolicy.validate](/tempo/actions/receivePolicy.validate)
- [receivePolicy.watchBlocked](/tempo/actions/receivePolicy.watchBlocked)
- [receivePolicy.watchBurned](/tempo/actions/receivePolicy.watchBurned)
- [receivePolicy.watchClaimed](/tempo/actions/receivePolicy.watchClaimed)
- [receivePolicy.watchUpdated](/tempo/actions/receivePolicy.watchUpdated)
- [faucet.fund](/tempo/actions/faucet.fund)
- [reward.claim](/tempo/actions/reward.claim)
- [reward.distribute](/tempo/actions/reward.distribute)
- [reward.getGlobalRewardPerToken](/tempo/actions/reward.getGlobalRewardPerToken)
- [reward.getPendingRewards](/tempo/actions/reward.getPendingRewards)
- [reward.getUserRewardInfo](/tempo/actions/reward.getUserRewardInfo)
- [reward.setRecipient](/tempo/actions/reward.setRecipient)
- [reward.watchRewardDistributed](/tempo/actions/reward.watchRewardDistributed)
- [reward.watchRewardRecipientSet](/tempo/actions/reward.watchRewardRecipientSet)
- [simulate.simulateBlocks](/tempo/actions/simulate.simulateBlocks)
- [simulate.simulateCalls](/tempo/actions/simulate.simulateCalls)
- [dex.buy](/tempo/actions/dex.buy)
- [dex.cancel](/tempo/actions/dex.cancel)
- [dex.cancelStale](/tempo/actions/dex.cancelStale)
- [dex.createPair](/tempo/actions/dex.createPair)
- [dex.getBalance](/tempo/actions/dex.getBalance)
- [dex.getBuyQuote](/tempo/actions/dex.getBuyQuote)
- [dex.getOrder](/tempo/actions/dex.getOrder)
- [dex.getTickLevel](/tempo/actions/dex.getTickLevel)
- [dex.getSellQuote](/tempo/actions/dex.getSellQuote)
- [dex.place](/tempo/actions/dex.place)
- [dex.placeFlip](/tempo/actions/dex.placeFlip)
- [dex.sell](/tempo/actions/dex.sell)
- [dex.watchFlipOrderPlaced](/tempo/actions/dex.watchFlipOrderPlaced)
- [dex.watchOrderCancelled](/tempo/actions/dex.watchOrderCancelled)
- [dex.watchOrderFilled](/tempo/actions/dex.watchOrderFilled)
- [dex.watchOrderPlaced](/tempo/actions/dex.watchOrderPlaced)
- [dex.withdraw](/tempo/actions/dex.withdraw)
- [token.approve](/tempo/actions/token.approve)
- [token.burn](/tempo/actions/token.burn)
- [token.burnBlocked](/tempo/actions/token.burnBlocked)
- [token.changeTransferPolicy](/tempo/actions/token.changeTransferPolicy)
- [token.create](/tempo/actions/token.create)
- [token.getAllowance](/tempo/actions/token.getAllowance)
- [token.getBalance](/tempo/actions/token.getBalance)
- [token.getMetadata](/tempo/actions/token.getMetadata)
- [token.grantRoles](/tempo/actions/token.grantRoles)
- [token.hasRole](/tempo/actions/token.hasRole)
- [token.mint](/tempo/actions/token.mint)
- [token.pause](/tempo/actions/token.pause)
- [token.renounceRoles](/tempo/actions/token.renounceRoles)
- [token.revokeRoles](/tempo/actions/token.revokeRoles)
- [token.setRoleAdmin](/tempo/actions/token.setRoleAdmin)
- [token.setSupplyCap](/tempo/actions/token.setSupplyCap)
- [token.transfer](/tempo/actions/token.transfer)
- [token.unpause](/tempo/actions/token.unpause)
- [token.watchAdminRole](/tempo/actions/token.watchAdminRole)
- [token.watchApprove](/tempo/actions/token.watchApprove)
- [token.watchBurn](/tempo/actions/token.watchBurn)
- [token.watchCreate](/tempo/actions/token.watchCreate)
- [token.watchMint](/tempo/actions/token.watchMint)
- [token.watchRole](/tempo/actions/token.watchRole)
- [token.watchTransfer](/tempo/actions/token.watchTransfer)
- [validator.add](/tempo/actions/validator.add)
- [validator.changeOwner](/tempo/actions/validator.changeOwner)
- [validator.changeStatus](/tempo/actions/validator.changeStatus)
- [validator.get](/tempo/actions/validator.get)
- [validator.getByIndex](/tempo/actions/validator.getByIndex)
- [validator.getCount](/tempo/actions/validator.getCount)
- [validator.getNextFullDkgCeremony](/tempo/actions/validator.getNextFullDkgCeremony)
- [validator.getOwner](/tempo/actions/validator.getOwner)
- [validator.list](/tempo/actions/validator.list)
- [validator.setNextFullDkgCeremony](/tempo/actions/validator.setNextFullDkgCeremony)
- [validator.update](/tempo/actions/validator.update)
- [virtualAddress.getMasterAddress](/tempo/actions/virtualAddress.getMasterAddress)
- [virtualAddress.registerMaster](/tempo/actions/virtualAddress.registerMaster)
- [virtualAddress.resolve](/tempo/actions/virtualAddress.resolve)
- [wallet.deposit](/tempo/actions/wallet.deposit)
- [wallet.transfer](/tempo/actions/wallet.transfer)
- [wallet.swap](/tempo/actions/wallet.swap)
- [zone.deposit](/tempo/actions/zone.deposit)
- [zone.encryptedDeposit](/tempo/actions/zone.encryptedDeposit)
- [zone.getAuthorizationTokenInfo](/tempo/actions/zone.getAuthorizationTokenInfo)
- [zone.getDepositStatus](/tempo/actions/zone.getDepositStatus)
- [zone.getWithdrawalFee](/tempo/actions/zone.getWithdrawalFee)
- [zone.getZoneInfo](/tempo/actions/zone.getZoneInfo)
- [zone.requestVerifiableWithdrawal](/tempo/actions/zone.requestVerifiableWithdrawal)
- [zone.requestWithdrawal](/tempo/actions/zone.requestWithdrawal)
- [zone.signAuthorizationToken](/tempo/actions/zone.signAuthorizationToken)
- [withRelay](/tempo/transports/withRelay)
- [TempoAddress.format](/tempo/utilities/TempoAddress.format)
- [TempoAddress.parse](/tempo/utilities/TempoAddress.parse)
- [TempoAddress.validate](/tempo/utilities/TempoAddress.validate)
- [Storage.defaultStorage](/tempo/utilities/Storage.defaultStorage)
- [Storage.from](/tempo/utilities/Storage.from)
- [Storage.memory](/tempo/utilities/Storage.memory)
- [Storage.session](/tempo/utilities/Storage.session)
- [Client](/zksync/client): Setting up your ZKsync Viem Client
- [Chains](/zksync/chains)
- [toSinglesigSmartAccount (ZKsync)](/zksync/accounts/toSinglesigSmartAccount): Creates a single-signature ZKsync Smart Account
- [toMultisigSmartAccount (ZKsync)](/zksync/accounts/toMultisigSmartAccount): Creates a multi-signature ZKsync Smart Account
- [toSmartAccount (ZKsync)](/zksync/accounts/toSmartAccount): Creates a ZKsync Smart Account
- [deployContract](/zksync/actions/deployContract): Deploys a contract to the network, given bytecode & constructor arguments by using EIP712 transaction.
- [sendTransaction](/zksync/actions/sendTransaction): Creates, signs, and sends a new transaction to the network, with EIP712 transaction support.
- [signTransaction](/zksync/actions/signTransaction): Signs a transaction, with EIP712 transaction support.
- [writeContract](/zksync/actions/writeContract): Executes a write function on a contract, with EIP712 transaction support.
- [estimateGasL1ToL2](/zksync/actions/estimateGasL1ToL2): Returns an estimated gas for L1 to L2 execution.
- [getBlockDetails](/zksync/actions/getBlockDetails): Returns additional ZKsync-specific information about the L2 block.
- [getBridgehubContractAddress](/zksync/actions/getBridgehubContractAddress): Returns the Bridgehub smart contract address.
- [getDefaultBridgeAddresses](/zksync/actions/getDefaultBridgeAddress): Returns the addresses of the default ZKsync Era bridge contracts on both L1 and L2.
- [getGasPerPubData](/zksync/actions/getGasPerPubData): Returns the scaled gas per pubdata limit for the currently open batch.
- [getL1BatchDetails](/zksync/actions/getL1BatchDetails): Returns data pertaining to a given batch.
- [getL1BatchBlockRange](/zksync/actions/getL1BatchBlockRange): Returns the range of blocks contained within a batch given by batch number.
- [getL1BatchNumber](/zksync/actions/getL1BatchNumber): Returns the latest L1 batch number.
- [getL1TokenAddress](/zksync/actions/getL1TokenAddress): Returns the L1 token address equivalent for a L2 token address as they are not equal.
- [getL2TokenAddress](/zksync/actions/getL2TokenAddress): Returns the L2 token address equivalent for a L1 token address as they are not equal.
- [getLogProof](/zksync/actions/getLogProof): Given a transaction hash, and an index of the L2 to L1 log produced within the transaction, it returns the proof for the corresponding L2 to L1 log.
- [getTransactionDetails](/zksync/actions/getTransactionDetails): Returns data from a specific transaction given by the transaction hash.
- [estimateFee](/zksync/actions/estimateFee): Returns an estimated Fee for requested transaction.
- [getAllBalances](/zksync/actions/getAllBalances): Returns all known balances for a given account.
- [getBaseTokenL1Address](/zksync/actions/getBaseTokenL1Address): Returns the base token L1 address.
- [getL1ChainId](/zksync/actions/getL1ChainId): Returns the Chain Id of underlying L1 network.
- [getMainContractAddress](/zksync/actions/getMainContractAddress): Returns the address of a Main ZKsync Contract.
- [getRawBlockTransaction](/zksync/actions/getRawBlockTransactions): Returns data of transactions in a block.
- [getTestnetPaymasterAddress (depreated)](/zksync/actions/getTestnetPaymasterAddress): Returns the address of a Paymaster on a Testnet.
- [getL1Allowance](/zksync/actions/getL1Allowance): Determines the amount of approved tokens for a specific L1 bridge.
- [getL1Balance](/zksync/actions/getL1Balance): Returns the amount of the token held by the account on the L1 network.
- [getL1TokenBalance](/zksync/actions/getL1TokenBalance): Retrieve the token balance held by the contract on L1.
- [isWithdrawalFinalized](/zksync/actions/isWithdrawalFinalized): Returns whether the withdrawal transaction is finalized on the L1 network.
- [withdraw](/zksync/actions/withdraw): Initiates the withdrawal process which withdraws ETH or any ERC20 token from the associated account on L2 network to the target account on L1 network.
- [requestExecute](/zksync/actions/requestExecute): Requests execution of a L2 transaction from L1.
- [finalizeWithdrawal](/zksync/actions/finalizeWithdrawal): Proves the inclusion of the `L2->L1` withdrawal message.
- [deposit](/zksync/actions/deposit): Transfers the specified token from the associated account on the L1 network to the target account on the L2 network.
- [claimFailedDeposit](/zksync/actions/claimFailedDeposit): Withdraws funds from the initiated deposit, which failed when finalizing on L2.
- [getApprovalBasedPaymasterInput](/zksync/utilities/paymaster/getApprovalBasedPaymasterInput): Returns encoded formatted approval-based paymaster params.
- [getGeneralPaymasterInput](/zksync/utilities/paymaster/getGeneralPaymasterInput): Returns encoded formatted general-based paymaster params.
- [getL2HashFromPriorityOp](/zksync/utilities/bridge/getL2HashFromPriorityOp): Returns the hash of the L2 priority operation from a given L1 transaction receipt.
- [parseEip712Transaction](/zksync/utilities/parseEip712Transaction): Parse EIP712 transaction.
- [Viem · TypeScript Interface for Ethereum](/index)
- [Client](/experimental/client): Setting up your Viem Client
- [ZKsync](/docs/chains/zksync): Integrating with ZKsync in Viem
- [defineKzg](/docs/utilities/defineKzg): Defines a KZG interface.
- [fromBase58](/docs/utilities/fromBase58)
- [fromBase64](/docs/utilities/fromBase64)
- [toBase58](/docs/utilities/toBase58)
- [toBase64](/docs/utilities/toBase64)
- [opaqueDataToDepositData](/op-stack/utilities/fromOpaqueData): Decodes opaque deposit data found in the "TransactionDeposited" event log.
- [fee.validateToken](/tempo/actions/fee.validateToken)
- [Setup](/tempo/actions/setup)
- [withFeePayer](/tempo/transports/withFeePayer)
- [TODO](/account-abstraction/actions/bundler/introduction)
- [verifyHash](/docs/actions/public/verifyHash): Verifies if a signed hash was generated by the provided address.
-->

# grantPermissions

Request permissions from a wallet to perform actions on behalf of a user.

[Read more.](https://eips.ethereum.org/EIPS/eip-7715)

:::warning\[Warning]
This is an experimental action that is not supported in most wallets. It is recommended to have a fallback mechanism if using this in production.
:::

## Usage

:::code-group

```ts twoslash [example.ts]
// @twoslash-cache: {"v":2,"hash":"c5c2e2e8ed827c831ff0e818560ad78af2d893327fabe1724e656d36f281ba48","data":"N4Igdg9gJgpgziAXAbVAFwJ4AcZJACwgDcYAnEAGhDRgA808AKAQwBsBLZuASgAIAzAK5gAxmnYQwvLM1JwYAUT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PwKIs55m6r6F6u+CRA4Nd+AZOLH5x0v0DAfZ/CBBqBbanyRisZHpzEfVi/+i3YEFETnxOA2SF59c752Ju8POdwnw05/l8ICl1mH2vy09u4e5T7TYq6+4Laa42CibiYtgQDNiiAwCm7g5MghTO7C5x5i4ZBZ4/7cg27/7BY8hAE45RaGiz6E7+5UbkIwFwEiACQ75BAR5IHfKrSx5hgYEgBJ7YGPIo4u4AGPLYiEGgrEE+754LZUETg0F+ABBBBl5bZ67RgFDVSwHiHkwHZSCeBt6MEDzMiDxoGqhsFiHwHD53J4GjaPIY7FiTaCHK4kE1imgAgoiJBqA3Al7pZGD/RmBvQ2CeBOCuDuDeHeCSG77BB5p2wijfgyEZDZBgC5BSRyph7vSVDwCdhV4ND6o0Qc6rZ9BVRDAODGoTDTCzCWqwTWrZo7B7D8pHAnBmC3YXBxCig57BpIBPAvC0C7YfDij1oFphE3CggypQhdo5qIjdGOEYg4h4gEgrBEiEKsYUhUi0iaHojYg266F8FsHDEzyO6uaj6mF+Qgg2bmiwB4CdH/DrGkC9EZqdrZp1onINpWg5bGBvIXLnHlrDBVqSDZIGC5puCiAWgxCfpjoFC/rLxTqJqAaIoU4s4zq8CEjIAACEBx5MKqW6cwPk1IQEfW04EGS20Gp0TkI08GiGzkyG5GzOpOvA2GHEvG84mugmVewmUBBuecRuZAMmLCAeCm1J/QReAmzedMrJrEWm0gG+X+WGMSVJD4NJDJ4wBhNB/JsU7JQeGEMpAkpxaIXIeIgpnGMSZmj4FmTS5GepIIVmVA2KzASAoABoSkpseAUkIAIIIIQAA="}
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({ // [!code focus:99]
  account,
  expiry: 1716846083638,
  permissions: [
    {
      type: 'native-token-transfer',
      data: {
        ticker: 'ETH',
      },
      policies: [
        {
          type: 'token-allowance',
          data: {
            allowance: parseEther('1'),
          },
        },
      ],
    },
  ],
})
```

```ts twoslash [config.ts] filename="config.ts"
// @twoslash-cache: {"v":2,"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/s9jYBRVes+pd/nVTiq7jlBNYwHHWIAHpUNBzY9XK2NypGdSEAAQkKpgCrMkA1vvlhgEtZnxpcBpMgB7gLo4g2OfsUoOrFoC5RC4kcZyBVLMAkAoAMoPhTwBQQQAr0V6EAA=="}
import 'viem/window'
// ---cut---
import { createWalletClient, custom } from 'viem'
import { mainnet } from 'viem/chains'
import { erc7715Actions } from 'viem/experimental'

export const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum!),
}).extend(erc7715Actions())

export const [account] = await walletClient.getAddresses()
```

:::

## Returns

`GrantPermissionsReturnType`

Response from the wallet after issuing permissions.

## Parameters

### account

* **Type:** `Account | Address | undefined`

The Account to scope the permissions to.

```ts twoslash
// @twoslash-cache: {"v":2,"hash":"8f69f1e593886ef1f7f25db3af6517cae1f6be0fcf3e1784304747696628ad60","data":"N4Igdg9gJgpgziAXAbVAFwJ4AcZJACwgDcYAnEAGhDRgA808AKAQwBsBLZuASgAIAzAK5gAxmnYQwvLM1JwYAUTT4yjGMrKJecNKXZgA5hV7D2aAPxaAOiADuMdjd4AfXjYP3HIbloBG7A300KzB2AFssCFI0aVl5JRVyKigIEQREEABhSRJouF5mbV19A15SGCxy+TA0ZnFJXgh+XnVE3jQIXjBBMLJ2ETZeTwA6EJCAWl4AEVS4LXw0NCw5gHoVonYYMOG4fBWUtJXBcQ5xeBWZOUUNJOpmA3TkZBA6ZgjWXCpwyOjeYFirgkyLwAL4CUgQMK8ADkGy20LGYEu8RujGhABYAEwABmh3BCa14WOxJNJZPJZLAIAAutSqDpZAxEABOKgfQzKJAARmxVFqpAM6jwyOuiUoIA4YFwiF5IBE+FkzDEZCQzJBFHQ2GlBGIKr5dCZIBYHC4fBEkh0BRE5uEaC0AANsbQACTAHR6Qwg+0hb5RGJKm01cUM6JIdEAZjZMA5+CQAHY+bJBYaAxBbeLJdKuVR5YrleQWerNTg8IRcuKaPQmGxODxeOawJbbGwPmhMhxo3beO3NjUADyZQQ6SEAFVIzEbPzQxmA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haHtZNwi4ubD5269YjEzxO6uYj6AF+Qgg2bmiwB4BdH/CbGkB9EZqdrZp1onINpWg5bGBvIXKXHlrDBVqSDZIGC5puCiAWgxCfpjoFC/rLxTqJqAaIqU6s7gb7j9ZJqEjIAACERx5MKqW6cA1IEGy20Gp0TkI08GiGzkyG5Gku6KvA2GHEvG84mugm1ewmsBBuecRuZAMmLClBweeG/QxeAmLedMrJrEWm0gn+d2WGMSVJD4NJDJ4wxhtB/JsU7J4pj4MpAk5xaIXIeIgpnGMSZmj4FmTS5GepIIVmVA2KzASAoABoSkps/eCAIIIIQAA==="}
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({
  account, // [!code focus]
  expiry: 1716846083638,
  permissions: [
    {
      type: 'native-token-transfer',
      data: {
        ticker: 'ETH',
      },
      policies: [
        {
          type: 'token-allowance',
          data: {
            allowance: parseEther('1'),
          },
        },
      ],
    },
  ],
})
```

### expiry

* **Type:** `number`

The timestamp (in seconds) when the permissions will expire.

```ts twoslash
// @twoslash-cache: {"v":2,"hash":"f057071e50b3c359d8b9162b211eb9c5020d2b25d7617904097d3d23391fb726","data":"N4Igdg9gJgpgziAXAbVAFwJ4AcZJACwgDcYAnEAGhDRgA808AKAQwBsBLZuASgAIAzAK5gAxmnYQwvLM1JwYAUTT4yjGMrKJecNKXZgA5hV7D2aAPxaAOiADuMdjd4AfXjYP3HIbloBG7A300KzB2AFssCFI0aVl5JRVyKigIEQREEABhSRJouF5mbV19A15SGCxy+TA0ZnFJXgh+XnVE3jQIXjBBMLJ2ETZeTwA6EJCAWl4AEVS4LXw0NCw5gHoVonYYMOG4fBWUtJXBcQ5xeBWZOUUNJOpmA3TkZBA6ZgjWXCpwyOjeYFirgkyLwAL4CUgQMK8ADkGy20LGYEu8RujGhABYAEwABmh3BCa14WOxJNJZPJZLAIAAutSqDpZAxEABOKgfQzKJAARmxVFqpAM6jwyOuiUoIA4YFwiF5IBE+FkzDEZCQzJBFHQ2GlBGIKr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Tl7pZGD/RmBvQ2CeBOCuDuABHeDyF77BB5p2wijfhKEZDZBgC5BSRyoR7vSVDwCdi14ND6o0Rc5rZ9BVRDAODGoTDTCzCWqwTWrZo7B7D8pHAnBmB3YXCuExGJgPBIBPAvC0B7YfDij1oFrRE3CggypQhdo5qIgDGJBojEh4gEgrBEiEKsYUhUi0j6HtYw7GHCHcEgATEzzO6uZj4kF+Qgg2bmiwB4B9H/A7GkBDEZqdrZp1onINpWg5bGBvIXI3HlrDBVqSDZIGC5puCiAWgxCfpjoFC/rLxTqJqAaIpU5s7gb7j9bTgQbLbQanROQjTwaIbOTIbGCEjIAACEpx5MKqW6cA1IQEUu6KvA2GHEvG84Wugmtewm8BhuecxuZAMmLCtBIeeG/QpeAmbedMnJrEWm0g3+d2WGMSdJD4DJLJ4wFhjBwpsU3J0pj4CpAkVxaIXIeIopnGMSZmj4FmTS5GRpIIVmVA2KzASAoABoSkpsg+CAIIIIQAA==="}
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({
  account,
  expiry: 1716846083638, // [!code focus]
  permissions: [
    {
      type: 'native-token-transfer',
      data: {
        ticker: 'ETH',
      },
      policies: [
        {
          type: 'token-allowance',
          data: {
            allowance: parseEther('1'),
          },
        },
      ],
    },
  ],
})
```

### permissions

* **Type:** `Permission[]`

Set of Permissions & Policies to grant to the user.

```ts twoslash
// @twoslash-cache: {"v":2,"hash":"da2a2e903731dbf836642816258e4400c8c53320b0ac61eb2cc3ead08682bbdb","data":"N4Igdg9gJgpgziAXAbVAFwJ4AcZJACwgDcYAnEAGhDRgA808AKAQwBsBLZuASgAIAzAK5gAxmnYQwvLM1JwYAUTT4yjGMrKJecNKXZgA5hV7D2aAPxaAOiADuMdjd4AfXjYP3HIbloBG7A300KzB2AFssCFI0aVl5JRVyKigIEQREEABhSRJouF5mbV19A15SGCxy+TA0ZnFJXgh+XnVE3jQIXjBBMLJ2ETZeTwA6EJCAWl4AEVS4LXw0NCw5gHoVonY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mVA2KzApp7RNAjYpsg+CAIIIIQAA==="}
// @noErrors
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({
  account,
  expiry: 1716846083638,
  permissions: [ // [!code focus:19]
    {
      type: 'native-token-transfer',
      data: {
        ticker: 'ETH',
      },
      policies: [
        {
          type: 'token-allowance',
          data: {
            allowance: parseEther('1'),
          },
        },
      ],
    },
    { 
      type: '  
//           ^| 
    } 
  ], 
})
```

:::tip
The `type` property is constrained to the canonical set of [Permission & Policy types as
defined in ERC-7715](https://github.com/pedrouid/ERCs/blob/19c16341c57f6ac8770cb778d60845dcf30f6a40/ERCS/erc-7715.md#permissions), however, consumers can utilize a `custom` property on `type` as an escape hatch to use custom Permission or Policy types:

```ts twoslash
// @twoslash-cache: {"v":2,"hash":"69090e3416bdb9ac4fec376611e76e87728a34d971d1e94f00660ee1f3a6e9cb","data":"N4Igdg9gJgpgziAXAbVAFwJ4AcZJACwgDcYAnEAGhDRgA808AKAQwBsBLZuASgAIAzAK5gAxmnYQwvLM1JwYAUTT4yjGMrKJecNKXZgA5hV7D2aAPxaAOiADuMdjd4AfXjYP3HIbloBG7A300KzB2AFssCFI0aVl5JRVyKigIEQREEABhSRJouF5mbV19A15SGCxy+TA0ZnFJXgh+XnVE3jQIXjBBMLJ2ETZeTwA6EJCAWl4AEVS4LXw0NCw5gHoVonYYMOG4fBWUtJXBcQ5xeBWZOUUNJOpmA3TkZBA6ZgjWXCpwyOjeYFirgkyLwAL4CUgQMK8ADkGy20LGYEu8RujGhABYAEwABmh3BCa14WOxJNJZPJZLAIAAutSqDpZAxEABOKgfQzKJAARmxVFqpAM6jwyOuiUoIA4YFwiF5IBE+FkzDEZCQzJBFHQ2GlBGIKr5dCZIBYHC4fBEkh0BRE5uEaC0AANsbQACTAHR6Qwg+0hb5RGJKm01cUM6JIdEAZjZMA5+CQAHY+bJBYaAxBbeLJdKuVR5YrleQWerNTg8IRcuKaPQmGxODxeOawJbbGwPmhMhxo3beO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IVQphZgPgqZbRvUdC6N0xRPT2j+sbQMMQBYAwmcLPlsw8DZeUzEDoBQ0UGCkBoaQbKpX5A6MMYMdnHnollOyZz8Znn+xAIl52Ep+7okjnmHFSBMRhe1NPFO4KjSxbIPFloG4DN1O6GEbxtx+V4DwWKt4WBeCMH0NoGADYXp8GUHUbQOARA002I1lQ7R+KLnPLYfA/R8DtDe/keQvneAAFkCKKxHEtqDMBmv11DI80KTdOttzc0mXrkGVv+aQKFEbfyCwTY1AncL02wXRbmxCOLcK6s+Ya8k/R/qMNgB+kVtIeBFbqEaM0dDvnGudC84qz75NDWkHB7Zhujy4x3Nhy5rqPXDSs4ayj9u6OR6Y8m0nSLs8CeQqJwtkn/G1nJp3loVJBgpktcFziYbTm26m/c71/DMuUND1G6PEaiuQXK9TkwebsKzTbrCHr9LBgjeQ4BT7UXSB4ddzwFuneNu5fBfsk7iLM9XcxfVx7i8VGtDCBXJAWwVIIdMkxKFEXLdzcS7wHJ5gMvHO/PlyHuPeOouGjV9CjXfAiBsFFT7j0fvc/jbjEHovLm0e+w8yAVvrBRUy55NHsbiA442fNLAPA9aC0im/KCGVUIu05ptvm/4/Wk1vIuWvjNnbhhVskNkgwua3CiAtDET9Y6Ci/uXlOxNgHEVU7Z+B/ce/yNI+g6dJyEaeDRDZyZDcjKXdFXgbDDif4bRLXGNL3ATMNTcGAaEbjXgQkZAAAQnn3JhVQj2pFkzT21wPFH3bwY1oACigG8SyRkxYRBDumv3nDpGvxBCsyoGxXL0QFAANCUlNjwCkhABBBBCAA="}
// @noErrors
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({
  account,
  expiry: 1716846083638,
  permissions: [
    { 
      type: { custom: 'example' }, // [!code focus]
      data: {
        value: '0xdeadbeef',
      }
    } 
  ], 
})
```

:::

### signer

* **Type:** `Signer | undefined`

Custom signer type to scope the permissions to.

```ts twoslash
// @twoslash-cache: {"v":2,"hash":"2af0919c57dfd36d88491c95219ef2d7843e43150ad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3gdeBBqDbfNXubh3bSHgbIYBchSTlYT96lR4CdjqKbZ7LQbhfZS30KqQwHDGomNMWYlrYLWuzTsPY/KjgnDMDVi4cRRQq+DUgJ4S2csfHFPWgtCe2gdqhF2nNiIx+qAxDiPEBIVhEkIaxikVJaTC626FKnTm248il8KLv34Yc26C5t1zSuXdRcNJC9XXP3r6cM29XwEAdJYTGTMnJSeBVSxUMXqILoCAGIOrN5AxS0T7OrKHU2f7WzUnMXabFuNuOXCHbuGAJ/YGGHLqdbRnObK/UFG/Dne/E7MuAwKUUgN6RWAIcgjJAGCZYWH/B7ag4EDoAoNFMg77U7Hzc7RVWA65b5PyY3ObQ/DIUg8grA3fW3YLbbR3WnVnFXA7O/aFDXUrHHP+MTDAGwfXJkMKXfCXFzXfVAvAWnMOL5R5OHKQi/ULWQ4FZXfbN3TnE7HnchfJIoD0InUWbQ75WaIQxAQwhbaXKjLAu5Sw0eaw4sXbAg1HW/RwrHVwwnLwvwhzXwn2IwjIMGLA+nUIxXGzc0WAPAEff4WfUgUEGVSfbNOtE5BtK0QMJNN5C5UojNTtYYKtSQbJAwXNNwUQC0GIT9MdAoX9ZeKdRNQDRFK7N7cDfcRLaDU6JyEaeDRDZyZDcjaAzDXgZALog8f4bRfjGEITGAETCAMTU1STMwdjTYijKjXcC4x8C3LsYotEbEYYUKPEYwbRMWXTdAwQEbIzUgEzG47jC4ukC4sQphf4QkZAAAQjyPJhVTx2pFkl2OhA0POIhOhOgFhNSCHARI4mcILTRJhIECxLgBxMfFcOhEJmhF4AJIxKJPhLumpOXyhMJLhOxKAjBBpNgDpLZIvXFGxWYCQFAANCUlNmMIQBBBBCAA==="}
import { parseEther } from 'viem'
import { account, walletClient } from './config'
 
const result = await walletClient.grantPermissions({
  expiry: 1716846083638,
  permissions: [ 
    { 
      type: 'native-token-limit', 
      data: { 
        amount: parseEther('0.5'), 
      }, 
      required: true, 
    }, 
  ], 
  signer: { // [!code focus]
    type: 'key', // [!code focus]
    data: { // [!code focus]
      id: '...' // [!code focus]
    } // [!code focus]
  } // [!code focus]
})
```
