Skip to main content

Launch Wallet Services

The launchWalletServices method launches a Secure Web Browser which allows you to use the templated wallet UI services. The method takes ChainConfig as the required input. Wallet Services is currently only available for EVM chains.

Method

launchWalletServices(chainConfig: ChainConfig, path?: string | null): Promise<void>;

Parameters

const chainConfig = {
chainId: "0x1", // Please use 0x1 for Mainnet
rpcTarget: "https://rpc.ethereum.org",
displayName: "Ethereum Mainnet",
blockExplorerUrl: "https://etherscan.io/",
ticker: "ETH",
tickerName: "Ethereum",
logo: "https://images.toruswallet.io/eth.svg",
};
ParameterDescription
chainNamespaceNamespace of the chain
chainIdChain ID of the chain
rpcTargetRPC target URL for the chain
wsTarget?Web socket target URL for the chain
displayName?Display name for the chain
blockExplorerUrl?URL of the block explorer
ticker?Default currency ticker of the network
tickerName?Name for currency ticker
decimals?Number of decimals for the currency
logo?Logo for the token
isTestnet?Whether the network is testnet or not
note

Access to Wallet Services is gated. You can use this feature in sapphire_devnet for free. The minimum pricing plan to use this feature in a production environment is the Scale Plan.

Usage

const chainConfig = {
chainNamespace: ChainNamespace.EIP155,
chainId: '0xaa36a7',
rpcTarget: 'https://rpc.sepolia.org',
// Avoid using public rpcTarget in production.
// Use services like Infura
displayName: 'Ethereum Sepolia Testnet',
blockExplorerUrl: 'https://sepolia.etherscan.io',
ticker: 'ETH',
tickerName: 'Ethereum',
decimals: 18,
logo: 'https://cryptologos.cc/logos/ethereum-eth-logo.png',
}

await web3auth.launchWalletServices(chainConfig)