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

# Signing transactions

> Sign EVM transactions in the browser with React Wallet Kit and the @0xkey-io/ethers adapter.

## Steps using `@0xkey-io/react-wallet-kit`

<Steps>
  <Step title="Initialize the React Provider">
    ```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    import { ZeroXKeyProvider } from "@0xkey-io/react-wallet-kit";
    const 0xkeyConfig = {
      apiBaseUrl: "https://api.0xkey.io",
      defaultOrganizationId: process.env.OXKEY_ORGANIZATION_ID, // prefix with NEXT_PUBLIC for NextJS
      rpId: process.env.RPID, // your application's domain
      iframeUrl: "https://authproxy.0xkey.io"
    }

    ...

    <div className="App">
      <ZeroXKeyProvider config={zeroXKeyConfig}>
      // Rest of app ...
      </ZeroXKeyProvider>
    </div>
    ```
  </Step>

  <Step title="Initialize an Ethers Provider and 0xkey Signer using the Passkey Client">
    ```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    import { ethers } from "ethers";
    import { ZeroXKeySigner } from "@0xkey-io/ethers";

    import { useZeroXKey } from "@0xkey-io/react-wallet-kit";
    const { 0xkey, passkeyClient } = useZeroXKey();

    const provider = new ethers.JsonRpcProvider(<provider api url>);
    const currentUser = await 0xkey.getCurrentUser();
    const 0xkeySigner = new ZeroXKeySigner({
      client: passkeyClient,
      organizationId: currentUser.organization.organizationId,
      signWith: "<wallet address to sign with>"
    })
    const connectedSigner = 0xkeySigner.connect(provider);
    ```
  </Step>

  <Step title="Call `sendTransaction` with the 0xkey Signer">
    ```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
    const transactionRequest = {
      to: "<destination address>",
      value: ethers.parseEther("<amount to send>"),
      type: 2,
    };
    const sendTransaction = await connectedSigner.sendTransaction(transactionRequest);
    ```
  </Step>
</Steps>

For Viem or Solana signing, see [`@0xkey-io/viem`](/sdks/typescript-frontend/landing#chain-and-dapp-adapters) and [`@0xkey-io/solana`](/sdks/typescript-frontend/landing#chain-and-dapp-adapters), or the [GitHub examples](https://github.com/0xkey-io/sdk-js/tree/main/examples).
