Skip to main content

Wallet Services

Web3Auth Wallet Services provides a comprehensive suite of wallet functionality including Fiat on Ramp, Swaps, and Wallet UI Interoperability with WalletConnect. These services enhance your application by offering a complete wallet experience without building these features from scratch.

tip

All these configurations can be directly accessed and managed through the Web3Auth dashboard. Manual configuration in the SDK is optional and provided here for reference purposes.

note

This is a paid feature and the minimum pricing plan to use this SDK in a production environment is the Growth Plan. You can use this feature in Web3Auth Sapphire Devnet network for free.

walletServicesConfig

The walletServicesConfig option allows you to customize the wallet services experience for your users.

walletServicesConfig?: WalletServicesConfig;

Configuration Options

PropertyTypeDescription
confirmationStrategyCONFIRMATION_STRATEGY_TYPEHow to display confirmation screens
modalZIndexnumberZ-index for modal windows
enableKeyExportbooleanEnable private key export functionality
whiteLabelObjectCustomization options for the widget appearance

Confirmation Strategy Options

StrategyDescription
defaultUses auto-approve by default, modal for WalletConnect requests
modalAlways uses modal for confirmations
auto-approveAutomatically approves transactions without confirmation

WhiteLabel Options

PropertyTypeDescription
showWidgetButtonbooleanWhether to show the widget button
buttonPositionBUTTON_POSITION_TYPEPosition of the widget button on the page
hideNftDisplaybooleanHide NFT display in the wallet
hideTokenDisplaybooleanHide token display in the wallet
hideTransfersbooleanHide transfer functionality
hideTopupbooleanHide top-up (fiat on-ramp) functionality
hideReceivebooleanHide receive address functionality
hideSwapbooleanHide token swap functionality
hideShowAllTokensbooleanHide the "show all tokens" option
hideWalletConnectbooleanHide WalletConnect integration
defaultPortfolio"token" | "nft"Default portfolio view

Button Position Options

PositionDescription
bottom-leftBottom left corner of the page
top-leftTop left corner of the page
bottom-rightBottom right corner of the page
top-rightTop right corner of the page

Usage

web3authContext.ts
import {
BUTTON_POSITION,
CONFIRMATION_STRATEGY,
WEB3AUTH_NETWORK,
type Web3AuthOptions,
} from "@web3auth/modal";
import { type Web3AuthContextConfig } from "@web3auth/modal/vue";

const web3AuthOptions: Web3AuthOptions = {
clientId: "YOUR_CLIENT_ID",
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
walletServicesConfig: {
confirmationStrategy: CONFIRMATION_STRATEGY.MODAL,
modalZIndex: 99999,
enableKeyExport: false,
whiteLabel: {
showWidgetButton: true,
buttonPosition: BUTTON_POSITION.BOTTOM_RIGHT,
hideNftDisplay: false,
hideTokenDisplay: false,
hideTransfers: false,
hideTopup: false,
hideReceive: false,
hideSwap: false,
hideShowAllTokens: false,
hideWalletConnect: false,
defaultPortfolio: "token",
},
},
};

const web3AuthContextConfig: Web3AuthContextConfig = {
web3AuthOptions,
};

export default web3AuthContextConfig;