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

# Sponsor Gas for Global Wallets

<Card title="Recommended: JavaScript SDK with React Hooks" icon="react" color="#4779FE">
  For new React apps, we recommend the JavaScript SDK with React Hooks (`@dynamic-labs-sdk/react-hooks`) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the [React quickstart (JavaScript SDK)](/javascript/reference/react-quickstart) to get started.
</Card>

<Note>This guide is currently React only.</Note>

## Overview

If you have account abstraction enabled on your global wallet, users will get a smart wallet created for them on login.

## Custom Paymaster

If you need to use your own paymaster for a global wallet (smart wallet), you can do so by creating your own kernel client and interacting with it.
If you are using the zerodev methods, make sure you have the `@zerodev/sdk` and `@dynamic-labs/ethereum-aa` packages as dependencies in your Global Wallets package (see the [dynamic-global-wallet repository](https://github.com/dynamic-labs/dynamic-global-wallet-example) for reference).

## Example

```ts theme={"system"}
import YourGlobalWallet from 'your-gw-wallet-package';
import { createKernelClient } from 'your-gw-wallet-package/zerodev';

// The wallet must be imported from your global wallet package
const smartWallet = YourGlobalWallet.wallets[0];

const kernelClient = createKernelClient({
  wallet: smartWallet,
  paymaster: 'SPONSOR',
  paymasterRpc: 'https://some-paymaster-rpc.com',
});

const { account } = kernelClient;

  const hash = await kernelClient.sendUserOperation({
    account,
    callData: await account.encodeCalls([
      {
        data: encodeFunctionData({
          abi: contractABI,
          args: [primaryWallet.address],
          functionName: 'mint',
        }),
        to: contractAddress,
        value: BigInt(0),
      },
      {
        data: encodeFunctionData({
          abi: contractABI,
          args: [primaryWallet.address],
          functionName: 'mint',
        }),
        to: contractAddress,
        value: BigInt(0),
      },
    ]),
  })

  return hash
```
