> For the complete documentation index, see [llms.txt](https://docs.zama.org/protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zama.org/protocol/sdk/api-references.md).

# API References

- [SDK reference](https://docs.zama.org/protocol/sdk/api-references/sdk.md)
- [ZamaSDK](https://docs.zama.org/protocol/sdk/api-references/sdk/zamasdk.md): Entry point for all confidential contract operations.
- [Token](https://docs.zama.org/protocol/sdk/api-references/sdk/token.md): Read/write interface for an ERC-7984 confidential token — balances, transfers, operator approvals.
- [WrappedToken](https://docs.zama.org/protocol/sdk/api-references/sdk/wrappedtoken.md): ERC-7984 ERC-20 wrapper interface — shield, unshield, allowance.
- [WrappersRegistry](https://docs.zama.org/protocol/sdk/api-references/sdk/wrappersregistry.md): Query the on-chain token wrappers registry — list pairs, look up tokens, and validate confidential tokens.
- [RelayerWeb](https://docs.zama.org/protocol/sdk/api-references/sdk/relayerweb.md): Browser relayer that runs FHE operations in a Web Worker via WASM.
- [RelayerNode](https://docs.zama.org/protocol/sdk/api-references/sdk/relayernode.md): Node.js relayer that runs FHE operations in native worker threads.
- [RelayerCleartext](https://docs.zama.org/protocol/sdk/api-references/sdk/relayercleartext.md): Development relayer that operates in cleartext mode without FHE, KMS, or gateway dependencies.
- [GenericProvider](https://docs.zama.org/protocol/sdk/api-references/sdk/genericprovider.md): Interface that all provider adapters must implement for read-only chain access.
- [GenericSigner](https://docs.zama.org/protocol/sdk/api-references/sdk/genericsigner.md): Interface that all signer adapters must implement for the SDK to interact with wallets.
- [ViemProvider](https://docs.zama.org/protocol/sdk/api-references/sdk/viemprovider.md): Provider adapter that wraps a viem PublicClient for read-only chain access.
- [ViemSigner](https://docs.zama.org/protocol/sdk/api-references/sdk/viemsigner.md): Signer adapter that wraps a viem WalletClient for wallet operations.
- [EthersProvider](https://docs.zama.org/protocol/sdk/api-references/sdk/ethersprovider.md): Provider adapter that wraps an ethers Provider or EIP-1193 source for read-only chain access.
- [EthersSigner](https://docs.zama.org/protocol/sdk/api-references/sdk/etherssigner.md): Signer adapter that wraps an ethers Signer or EIP-1193 source for wallet operations.
- [GenericStorage](https://docs.zama.org/protocol/sdk/api-references/sdk/genericstorage.md): Interface for async key-value storage used to persist transport key pairs and signed permits.
- [Errors](https://docs.zama.org/protocol/sdk/api-references/sdk/errors.md): All SDK error classes, codes, and the matchZamaError utility.
- [Contract builders](https://docs.zama.org/protocol/sdk/api-references/sdk/contract-builders.md): Low-level builders that return raw contract call configs for viem, ethers, or custom execution layers.
- [FheArtifactCache](https://docs.zama.org/protocol/sdk/api-references/sdk/fheartifactcache.md): Persistent cache for the FHE encryption key and public parameters, avoiding re-downloads across sessions.
- [Event decoders](https://docs.zama.org/protocol/sdk/api-references/sdk/event-decoders.md): Decode on-chain logs into typed event objects.
- [Delegations](https://docs.zama.org/protocol/sdk/api-references/sdk/delegation.md): On-chain delegation management — grant, revoke, and query decryption delegation rights via the ACL contract.
- [Network presets](https://docs.zama.org/protocol/sdk/api-references/sdk/network-presets.md): Pre-configured chain objects and legacy network configs for supported networks.
- [React reference](https://docs.zama.org/protocol/sdk/api-references/react.md)
- [ZamaProvider](https://docs.zama.org/protocol/sdk/api-references/react/zamaprovider.md): Context provider that supplies the Zama SDK to all descendant hooks.
- [useConfidentialBalance](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialbalance.md): Decrypt a single token's confidential balance.
- [useConfidentialBalances](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialbalances.md): Decrypt and poll multiple tokens' confidential balances in a single query.
- [useConfidentialTransfer](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialtransfer.md): Send confidential ERC-20 tokens privately.
- [useConfidentialTransferFrom](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialtransferfrom.md): Transfer confidential tokens on behalf of an owner who approved you as an operator.
- [useShield](https://docs.zama.org/protocol/sdk/api-references/react/useshield.md): Mutation hook that shields public ERC-20 tokens into confidential form.
- [useUnshield](https://docs.zama.org/protocol/sdk/api-references/react/useunshield.md): Mutation hook that unshields confidential tokens back to public ERC-20.
- [useUnshieldAll](https://docs.zama.org/protocol/sdk/api-references/react/useunshieldall.md): Mutation hook that unshields the entire confidential balance.
- [useResumeUnshield](https://docs.zama.org/protocol/sdk/api-references/react/useresumeunshield.md): Mutation hook that resumes an unshield interrupted between unwrap and finalize steps.
- [usePendingUnshield](https://docs.zama.org/protocol/sdk/api-references/react/usependingunshield.md): Read the unwrap tx hash of an unshield interrupted between its two phases.
- [useUnwrap](https://docs.zama.org/protocol/sdk/api-references/react/useunwrap.md): Low-level mutation hook that requests an unwrap for a specific amount.
- [useUnwrapAll](https://docs.zama.org/protocol/sdk/api-references/react/useunwrapall.md): Low-level mutation hook that requests an unwrap for the full confidential balance.
- [useFinalizeUnwrap](https://docs.zama.org/protocol/sdk/api-references/react/usefinalizeunwrap.md): Low-level mutation hook that finalizes an unwrap with the decryption proof.
- [useGrantPermit](https://docs.zama.org/protocol/sdk/api-references/react/usegrantpermit.md): Mutation hook that signs an EIP-712 message authorizing decryption of confidential encrypted values for any contract.
- [useHasPermit](https://docs.zama.org/protocol/sdk/api-references/react/usehaspermit.md): Query hook that checks whether stored permits cover the requested contract addresses.
- [useRevokePermits](https://docs.zama.org/protocol/sdk/api-references/react/userevokepermits.md): Revoke FHE permits for specific contract addresses, or all permits at once.
- [useClearCredentials](https://docs.zama.org/protocol/sdk/api-references/react/useclearcredentials.md): Wipe the transport key pair and all permits for the connected wallet.
- [useConfidentialSetOperator](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialsetoperator.md): Approve an operator to act on your confidential tokens.
- [useConfidentialIsOperator](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialisoperator.md): Check if a spender is an approved operator for a holder's confidential tokens.
- [useUnderlyingAllowance](https://docs.zama.org/protocol/sdk/api-references/react/useunderlyingallowance.md): Read the ERC-20 allowance of the underlying public token for the wrapper contract.
- [useWrapperDiscovery](https://docs.zama.org/protocol/sdk/api-references/react/usewrapperdiscovery.md): Find the confidential wrapper contract address for an ERC-20 token via the on-chain registry.
- [useWrappersRegistryAddress](https://docs.zama.org/protocol/sdk/api-references/react/usewrappersregistryaddress.md): Resolve the wrappers registry contract address for the current chain.
- [useListPairs](https://docs.zama.org/protocol/sdk/api-references/react/uselistpairs.md): Fetch paginated token wrapper pairs from the on-chain registry, with optional metadata enrichment.
- [useTokenPairsRegistry](https://docs.zama.org/protocol/sdk/api-references/react/usetokenpairsregistry.md): Fetch all token wrapper pairs from the on-chain registry.
- [useTokenPairsLength](https://docs.zama.org/protocol/sdk/api-references/react/usetokenpairslength.md): Get the total number of token wrapper pairs in the registry.
- [useTokenPairsSlice](https://docs.zama.org/protocol/sdk/api-references/react/usetokenpairsslice.md): Fetch a range of token wrapper pairs from the registry by index.
- [useTokenPair](https://docs.zama.org/protocol/sdk/api-references/react/usetokenpair.md): Fetch a single token wrapper pair by index from the registry.
- [useConfidentialTokenAddress](https://docs.zama.org/protocol/sdk/api-references/react/useconfidentialtokenaddress.md): Look up the confidential token address for a given plain ERC-20 token.
- [useTokenAddress](https://docs.zama.org/protocol/sdk/api-references/react/usetokenaddress.md): Reverse lookup -- find the plain ERC-20 address for a given confidential token.
- [useIsConfidentialTokenValid](https://docs.zama.org/protocol/sdk/api-references/react/useisconfidentialtokenvalid.md): Check whether a confidential token is registered and valid in the on-chain registry.
- [useMetadata](https://docs.zama.org/protocol/sdk/api-references/react/usemetadata.md): Get token name, symbol, and decimals in one call.
- [useZamaSDK](https://docs.zama.org/protocol/sdk/api-references/react/usezamasdk.md): Hook to access the raw ZamaSDK instance from ZamaProvider context.
- [useToken](https://docs.zama.org/protocol/sdk/api-references/react/usetoken.md): Hook returning a memoised Token instance for a given address.
- [useWrappedToken](https://docs.zama.org/protocol/sdk/api-references/react/usewrappedtoken.md): React hook returning a memoised WrappedToken instance.
- [useEncrypt](https://docs.zama.org/protocol/sdk/api-references/react/useencrypt.md): Low-level mutation hook that encrypts a plaintext value using the relayer's FHE engine.
- [useDecryptValues](https://docs.zama.org/protocol/sdk/api-references/react/usedecryptvalues.md): Query hook for FHE user decryption. Disabled by default — enable it to fire, and gate on a cached permit to avoid an unexpected wallet prompt.
- [useDelegateDecryption](https://docs.zama.org/protocol/sdk/api-references/react/usedelegatedecryption.md): Mutation hook that grants FHE decryption rights for a token to another address.
- [useRevokeDelegation](https://docs.zama.org/protocol/sdk/api-references/react/userevokedelegation.md): Mutation hook that revokes FHE decryption delegation for a token.
- [useDelegationStatus](https://docs.zama.org/protocol/sdk/api-references/react/usedelegationstatus.md): Query hook that checks whether a decryption delegation is active between two addresses.
- [useDecryptBalanceAs](https://docs.zama.org/protocol/sdk/api-references/react/usedecryptbalanceas.md): Mutation hook that decrypts another user's confidential balance as a delegate.
- [useBatchDecryptBalancesAs](https://docs.zama.org/protocol/sdk/api-references/react/usebatchdecryptbalancesas.md): Mutation hook that decrypts confidential balances across multiple tokens as a delegate.
- [Query keys](https://docs.zama.org/protocol/sdk/api-references/react/query-keys.md): Reference for the zamaQueryKeys factory used for manual React Query cache control.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zama.org/protocol/sdk/api-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
