# Smart Wallets

Smart wallets in Openfort are your primary interface for blockchain interactions. Once an embedded wallet is set up, a smart wallet is automatically created and associated for your user.

## Getting an EIP-1193 provider

All of Openfort's wallets can export a standard [EIP-1193 provider](https://eips.ethereum.org/EIPS/eip-1193) object. This allows your app to request signatures and transactions from the wallet, using familiar JSON-RPC requests like `personal_sign` or `eth_sendTransaction`.

:::info
[EIP-1193](https://eips.ethereum.org/EIPS/eip-1193), also known as the Ethereum JavaScript API, is a standardized interface for how applications can request information, signatures, and transactions from a connected wallet.
:::

To get a wallet's EIP-1193 provider, use the openfort `getEthereumProvider` method:

```typescript
getEthereumProvider(options?: {
  feeSponsorship?: string              // Fee sponsorship ID for gas sponsorship
  chains?: Record<number, string>     // Chain ID → RPC URL mapping
  providerInfo?: {                    // EIP-6963 provider metadata
    icon: `data:image/${string}`
    name: string
    rdns: string
  }
  announceProvider?: boolean          // Announce via EIP-6963
}): Promise<Provider>
```

:::code-group

```tsx [main.tsx]
import openfort from "./openfortConfig"
// This example assumes you have already checked that Openfort 'embeddedState' is
// `ready` and the user is `authenticated`
const provider = await openfort.embeddedWallet.getEthereumProvider();
```

```ts [openfortConfig.ts]
import { Openfort } from '@openfort/openfort-js';

const openfort = new Openfort({
  baseConfiguration: {
    publishableKey: "YOUR_OPENFORT_PUBLISHABLE_KEY",
  },
  shieldConfiguration: {
    shieldPublishableKey: "YOUR_SHIELD_PUBLISHABLE_KEY",
  },
});

export default openfort;
```

:::

When requesting signatures and transactions from the wallet, you can either choose to interface with the **EIP-1193** provider directly, or to pass it to a library like `wagmi` or `viem`.
