Skip to main content

Wallet Services

Embedded Wallets' 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 Embedded Wallets 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

import { Web3Auth, BUTTON_POSITION, CONFIRMATION_STRATEGY, WEB3AUTH_NETWORK } from '@web3auth/modal'

const web3auth = new Web3Auth({
clientId: 'YOUR_WEB3AUTH_CLIENT_ID', // Pass your Web3Auth Client ID, ideally using an environment variable
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',
},
},
})

// Initialize web3auth
await web3auth.init()