wallet.deposit
Opens the Wallet's deposit flow, with optional pre-filled fields.
This action invokes the wallet_deposit JSON-RPC method on the connected wallet, prompting the user to review and submit a deposit. Any fields you omit are left for the user to fill in.
Usage
import { Actions } from 'viem/tempo'
import { client } from './viem.config'
const result = await Actions.wallet.deposit(client, {
amount: '1.5',
token: 'pathusd',
})import { Provider } from 'accounts'
import { createClient, custom } from 'viem/tempo'
const provider = Provider.create()
export const client = createClient({
transport: custom(provider),
})Return Type
type ReturnType =
| {
/** Receipts of any onchain operations performed during the deposit. */
receipts?: readonly TransactionReceipt[] | undefined
}
| undefinedThe wallet may return undefined (or an object with no receipts) if the deposit did not require any onchain operations.
Parameters
address (optional)
- Type:
Address
Deposit address to pre-fill.
amount (optional)
- Type:
string
Human-readable amount to pre-fill (for example, "1.5").
chainId (optional)
- Type:
number
Source chain ID to pre-fill.
displayName (optional)
- Type:
string
Human-readable account display name.
token (optional)
- Type:
Address | string
Token address or supported deposit token symbol to pre-fill. Omit to let the user choose.