> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://accounts.tempo.xyz/api/mcp` to find what you need.

# `wallet_deposit`

Opens the wallet's deposit flow so the user can fund an account. The wallet renders the deposit UI (for example onramp, faucet, or transfer-from-an-external-wallet flows) using any pre-filled hints supplied in the request.

The wallet picks the deposit path it supports for the requested token and chain. For paths that move funds onchain (such as a testnet faucet drop), the wallet returns the resulting receipts. For paths where funds arrive asynchronously, such as MACH checkout, `receipts` is omitted.

This method is supported by Tempo Wallet's browser, mobile web authentication, and CLI device-code adapters. Local signing adapters without a deposit UI reject the request as unsupported.

## Request

```ts
type Request = {
  method: 'wallet_deposit'
  params: [{
    /** Recipient address. Defaults to the connected account. */
    address?: `0x${string}`
    /** Chain ID to deposit to. */
    chainId?: number
    /** Display name shown in the deposit UI (e.g. the app name). */
    displayName?: string
    /** Preferred funding path to show first. */
    intent?: 'credits' | 'crypto' | 'faucet' | 'mach' | 'referralCode' | 'x'
    /** Token symbol or contract address to pre-fill. */
    token?: string
    /** Human-readable amount to pre-fill (e.g. `"1.5"`). */
    amount?: string
  }]
}
```

## Response

```ts
type Response = {
  /**
   * Receipts of any onchain operations performed during the deposit
   * (e.g. testnet faucet drops). Absent for offchain paths like Apple
   * Pay where funds arrive asynchronously.
   */
  receipts?: TransactionReceipt[]
} | undefined
```

## Example

Use `Mach.fund` to open MACH checkout for the connected account. The helper selects the mainnet MACH token and validates the amount before requesting checkout. The user reviews and confirms the payment in Tempo Wallet.

```ts
import { Mach } from 'accounts'

await Mach.fund(provider, { amount: '5' })
```

For a terminal or another device that cannot display the wallet, generate a link bound to the intended account:

```ts
import { Mach } from 'accounts'

const url = Mach.getFundingUrl({
  address: '0x0000000000000000000000000000000000000001',
  amount: '5',
})
```

The same helpers are exported from `accounts/cli`. `Mach.fund` uses the CLI provider's device-code browser handoff when called with a CLI provider.

The underlying request is also available directly:

```ts
await provider.request({
  method: 'wallet_deposit',
  params: [{
    intent: 'mach',
    token: Mach.token.address,
    chainId: '0x1079',
    amount: '5',
  }],
})
```

MACH checkout currently supports Tempo mainnet (4217). Amounts are USD decimal strings with at most two decimal places; the checkout applies its current purchase limits. The deprecated `credits` intent remains accepted for older clients and opens MACH checkout in updated wallets. Existing MPP Credits remain a separate balance and are not converted by opening checkout.

Opening a link, closing the wallet, or receiving an empty response does not confirm a purchase. Check the resulting MACH balance or confirmed funding receipt before spending.
