> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Web3 Libraries

> Configure Ethers.js, Viem, or Wagmi to work with Para's secure wallet infrastructure

> [!NOTE]
>
> You're viewing the 2.0 (LTS) docs. [View the current 3.0 version of this page](https://docs.getpara.com/v3/react/guides/web3-operations/evm/setup-libraries.md).

Learn how to set up popular Web3 libraries with Para. Choose your library below.

## Prerequisites

Before setting up Web3 libraries, you need an authenticated Para session.

![Setup Para Instance](https://docs.getpara.com/images/v2/developer-portal-open-graph.png)

## [Setup Para Instance](https://docs.getpara.com/v2/react/setup/nextjs.md)

Configure ParaProvider and authenticate users before using Web3 libraries

> [tab] Ethers.js
>
> ## Install
>
> ```bash theme={null}
> npm install @getpara/react-sdk ethers
> ```
>
> > [!NOTE]
> >
> > `@getpara/react-sdk` bundles `@getpara/ethers-v6-integration` — no separate integration package install needed.
>
> ## Usage
>
> > [tab] Hook (React)
> >
> > Use the [useParaEthersSigner](https://docs.getpara.com/v2/react/guides/hooks/use-para-ethers-signer) hook to create an ethers signer for your user's Para embedded wallet or external wallet. For convenience, the [useParaEthersSignMessage](https://docs.getpara.com/v2/react/guides/hooks/use-para-ethers-sign-message) and [useParaEthersSendTransaction](https://docs.getpara.com/v2/react/guides/hooks/use-para-ethers-send-transaction) hooks wrap common signer methods in a React Query mutation.
> >
> > ```tsx theme={null}
> > import { useParaEthersSigner, useParaEthersSignMessage } from "@getpara/react-sdk";
> > import { JsonRpcProvider } from "ethers";
> >
> > const provider = new JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com");
> >
> > function SignWithEthers() {
> >   const { ethersSigner, isLoading } = useParaEthersSigner({ provider });
> >   const { signMessageAsync, isPending } = useParaEthersSignMessage(ethersSigner);
> >
> >   const handleSign = async () => {
> >     const signature = await signMessageAsync("Hello from Para!");
> >     console.log("Signature:", signature);
> >   };
> >
> >   if (isLoading) return <p>Loading...</p>;
> >   return (
> >     <button onClick={handleSign} disabled={isPending}>
> >       {isPending ? "Signing..." : "Sign Message"}
> >     </button>
> >   );
> > }
> > ```
> >
> > ### Wallet Resolution
> >
> > When no `address` or `walletId` is passed, the hook resolves the wallet in this order:
> >
> > 1. **Selected wallet** — if the user selected an EVM wallet in the UI. If there is only one EVM wallet in the session, it is already selected by default
> > 2. **First EVM wallet** — the first available EVM wallet on the account
> >
> > To target a specific wallet, pass `address` or `walletId`:
> >
> > ```tsx theme={null}
> > const { ethersSigner } = useParaEthersSigner({
> >   provider,
> >   address: "0x1234...",  // or walletId: "uuid-..."
> > });
> > ```
>
> > [tab] Direct (Non-React)
> >
> > Use `createParaEthersSigner` to create a signer directly.
> >
> > ```typescript theme={null}
> > import { createParaEthersSigner } from "@getpara/ethers-v6-integration";
> > import { ethers } from "ethers";
> > import Para from "@getpara/web-sdk";
> >
> > const para = new Para("YOUR_API_KEY");
> > const provider = new ethers.JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com");
> >
> > // Authenticate first...
> >
> > const signer = createParaEthersSigner({ para, provider });
> > const signature = await signer.signMessage("Hello from Para!");
> > ```
> >
> > ### Wallet Resolution
> >
> > When no `address` or `walletId` is passed, the factory picks the first available EVM wallet.
> >
> > To target a specific wallet:
> >
> > ```typescript theme={null}
> > const signer = createParaEthersSigner({
> >   para,
> >   provider,
> >   address: "0x1234...",  // looks up by address
> >   // or walletId: "uuid-...",  // looks up by ID
> > });
> > ```

> [tab] Viem
>
> ## Install
>
> ```bash theme={null}
> npm install @getpara/react-sdk viem
> ```
>
> > [!NOTE]
> >
> > `@getpara/react-sdk` bundles `@getpara/viem-v2-integration` — no separate integration package install needed.
>
> ## Usage
>
> > [tab] Hook (React)
> >
> > Use the [useParaViemClient](https://docs.getpara.com/v2/react/guides/hooks/use-para-viem-client.md) hook to create a viem `WalletClient` for your user's Para embedded wallet or external wallet. For convenience, the [useParaViemSignMessage](https://docs.getpara.com/v2/react/guides/hooks/use-para-viem-sign-message), [useParaViemSendTransaction](https://docs.getpara.com/v2/react/guides/hooks/use-para-viem-send-transaction), [useParaViemSignTypedData](https://docs.getpara.com/v2/react/guides/hooks/use-para-viem-sign-typed-data), and [useParaViemWriteContract](https://docs.getpara.com/v2/react/guides/hooks/use-para-viem-write-contract) hooks wrap common client methods in a React Query mutation.
> >
> > ```tsx theme={null}
> > import { useParaViemClient, useParaViemSignMessage } from "@getpara/react-sdk";
> > import { createPublicClient, http } from "viem";
> > import { sepolia } from "viem/chains";
> >
> > const publicClient = createPublicClient({
> >   chain: sepolia,
> >   transport: http("https://ethereum-sepolia-rpc.publicnode.com"),
> > });
> >
> > function SignWithViem() {
> >   const { viemClient, isLoading } = useParaViemClient({
> >     walletClientConfig: {
> >       chain: sepolia,
> >       transport: http("https://ethereum-sepolia-rpc.publicnode.com"),
> >     },
> >   });
> >
> >   const { signMessageAsync, isPending } = useParaViemSignMessage(viemClient);
> >
> >   const handleSign = async () => {
> >     const signature = await signMessageAsync({ message: "Hello from Para!" });
> >     console.log("Signature:", signature);
> >   };
> >
> >   if (isLoading) return <p>Loading...</p>;
> >   return (
> >     <button onClick={handleSign} disabled={isPending}>
> >       {isPending ? "Signing..." : "Sign Message"}
> >     </button>
> >   );
> > }
> > ```
> >
> > ### Wallet Resolution
> >
> > When no `address` or `walletId` is passed, the hook resolves the wallet in this order:
> >
> > 1. **Selected wallet** — if the user selected an EVM wallet in the UI. If there is only one EVM wallet in the session, it is already selected by default
> > 2. **First EVM wallet** — the first available EVM wallet on the account
> >
> > To target a specific wallet:
> >
> > ```tsx theme={null}
> > const { viemClient } = useParaViemClient({
> >   address: "0x1234...",  // or walletId: "uuid-..."
> >   walletClientConfig: { chain: sepolia, transport: http() },
> > });
> > ```
>
> > [tab] Direct (Non-React)
> >
> > Use `createParaViemAccount` and `createParaViemClient` to create a wallet client directly.
> >
> > ```typescript theme={null}
> > import { createParaViemAccount, createParaViemClient } from "@getpara/viem-v2-integration";
> > import { createPublicClient, http } from "viem";
> > import { sepolia } from "viem/chains";
> > import Para from "@getpara/web-sdk";
> >
> > const para = new Para("YOUR_API_KEY");
> >
> > // Authenticate first...
> >
> > const account = createParaViemAccount({ para });
> > const walletClient = createParaViemClient({ para, walletClientConfig: {
> >   account,
> >   chain: sepolia,
> >   transport: http("https://ethereum-sepolia-rpc.publicnode.com"),
> > }});
> >
> > const signature = await walletClient.signMessage({ message: "Hello from Para!" });
> > ```
> >
> > ### Wallet Resolution
> >
> > When no `address` or `walletId` is passed, the factory picks the first available EVM wallet.
> >
> > To target a specific wallet:
> >
> > ```typescript theme={null}
> > const account = createParaViemAccount({
> >   para,
> >   address: "0x1234...",  // looks up by address
> >   // or walletId: "uuid-...",  // looks up by ID
> > });
> > ```

> [tab] Wagmi
>
> ## Install
>
> ```bash theme={null}
> npm install @getpara/react-sdk
> ```
>
> > [!NOTE]
> >
> > **ParaProvider already includes Wagmi under the hood.** No additional packages needed. If you've set up ParaProvider as shown in the [Next.js setup guide](https://docs.getpara.com/v2/react/setup/nextjs.md), you can use Wagmi hooks directly.
>
> ## Usage
>
> ```tsx theme={null}
> import { useAccount, useBalance, useSendTransaction, useSignMessage } from "@getpara/react-sdk/wagmi";
>
> function MyComponent() {
>   const { address, isConnected } = useAccount();
>   const { data: balance } = useBalance({ address });
>   const { signMessageAsync } = useSignMessage();
>   const { sendTransaction } = useSendTransaction();
>
>   if (!isConnected) return <p>Not connected</p>;
>
>   return (
>     <div>
>       <p>Address: {address}</p>
>       <p>Balance: {balance?.formatted}</p>
>       <button onClick={() => signMessageAsync({ message: "Hello" })}>
>         Sign Message
>       </button>
>     </div>
>   );
> }
> ```
>
> ### Wallet Resolution
>
> Wagmi uses its own connector system. When using ParaProvider, the Para connector is the active connector and signing goes through Para's MPC. External wallets connected via wagmi (e.g. MetaMask) use their own signing providers.
>
> > [!NOTE]
> >
> > For advanced users integrating Para with existing Wagmi setups that manage external wallets, see the [Wagmi Connector Guide](https://docs.getpara.com/v2/react/guides/wagmi-connector.md).

## Next Steps

## [Configure RPC](https://docs.getpara.com/v2/react/guides/web3-operations/evm/configure-rpc.md)

Set up custom RPC endpoints for different networks

## [Send Tokens](https://docs.getpara.com/v2/react/guides/web3-operations/evm/send-tokens.md)

Transfer ETH and ERC-20 tokens programmatically

## [Sign Messages](https://docs.getpara.com/v2/react/guides/web3-operations/evm/sign-messages.md)

Sign messages for authentication or verification


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.