In JavaScript applications, you can interact with embedded wallets through Openfort's signature and transaction APIs, or through popular wallet libraries that support the EIP-1193 provider interface.

```typescript
import { Openfort } from '@openfort/openfort-js'

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

// Get EIP-1193 provider for library integration
const provider = await openfort.embeddedWallet.getEthereumProvider()

// With multi-chain and sponsorship options
const provider = await openfort.embeddedWallet.getEthereumProvider({
  feeSponsorship: 'pol_...',                     // gas sponsorship
  chains: { 1: 'https://eth.rpc.url' },        // Additional chain RPC URLs
  announceProvider: false,                       // Disable EIP-6963 announcement
})
```

## Browser-Specific Features

JavaScript embedded wallets in web browsers provide several unique capabilities:

### EIP-1193 Provider Interface

Direct access to the standard Ethereum provider interface for seamless integration with existing tooling.

```typescript
// Use with any EIP-1193 compatible library
const accounts = await provider.request({ method: 'eth_accounts' })
const chainId = await provider.request({ method: 'eth_chainId' })
```

### Web3 Library Integration

Seamless integration with popular libraries:

* **Wagmi**: React hooks for Ethereum
* **Viem**: TypeScript interface for Ethereum
* **Ethers**: Complete Ethereum library

```typescript
// Example with Viem
import { createWalletClient, custom } from 'viem'

const walletClient = createWalletClient({
  transport: custom(provider)
})
```
