For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Wallet Services configuration

The iOS SDK provides fine-grained control over the showWalletUI and request flows through the walletServicesConfig parameter in Web3AuthOptions. Customize how transaction confirmations display and tailor the wallet UI branding.

note

Wallet Services requires a paid plan. You can use this feature in sapphire_devnet at no cost. The minimum pricing plan to use this feature in a production environment is the Scale Plan.

WalletServicesConfig​

Pass walletServicesConfig in Web3AuthOptions to configure how Wallet Services behave across your dapp.

Parameters​

ParameterDescription
confirmationStrategy?Controls how transaction confirmations are displayed. Accepts ConfirmationStrategy. Default is .defaultStrategy.
whiteLabel?Whitelabel configuration for the Wallet Services UI. When provided, merged with the project-level whitelabel config. Accepts WhiteLabelData as a value.

ConfirmationStrategy​

ConfirmationStrategy controls the UI shown when a user needs to confirm a transaction or signature request.

ValueDescription
.defaultStrategyShows the default Web3Auth confirmation screen inside the wallet WebView. This is the default value.
.modalShows the confirmation request in a bottom sheet modal on top of your application, rather than navigating to a new full-screen WebView.
.popupShows the confirmation in a small popup window. Useful for minimal UI disruption.

Interface​

public struct WalletServicesConfig: Codable {
public let confirmationStrategy: ConfirmationStrategy?
public let whiteLabel: WhiteLabelData?

public init(
confirmationStrategy: ConfirmationStrategy? = nil,
whiteLabel: WhiteLabelData? = nil
)
}

public enum ConfirmationStrategy: String, Codable {
case defaultStrategy = "default"
case modal = "modal"
case popup = "popup"
}

Setup​

Configure walletServicesConfig during SDK initialization:

import Web3Auth

web3Auth = try await Web3Auth(
options: Web3AuthOptions(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
web3AuthNetwork: .SAPPHIRE_MAINNET,
redirectUrl: "com.yourapp.bundleid://auth",
walletServicesConfig: WalletServicesConfig(
confirmationStrategy: .modal,
whiteLabel: WhiteLabelData(
appName: "My App",
theme: ["primary": "#0364FF"]
)
)
)
)

Usage examples​

do {
try await web3Auth.showWalletUI()
} catch {
print(error.localizedDescription)
// Handle error
}