Turnkey home page
Search...
⌘K
Ask AI
Demo
Login
Get started
Get started
Search...
Navigation
SDK reference
switchWalletProviderChain()
Documentation
SDK reference
API reference
Security
Changelogs
Support
Blog
Contact us
SDK reference
Introduction
React
React Native
Flutter
Swift
TypeScript | Frontend
Overview
Getting Started
Authentication
Advanced backend authentication
Advanced API requests
Legacy (@turnkey/sdk-browser)
SDK reference
addOauthProvider()
addPasskey()
clearAllSessions()
clearSession()
clearUnusedKeyPairs()
completeOauth()
completeOtp()
connectWalletAccount()
constructor()
createApiKeyPair()
createPasskey()
createWallet()
createWalletAccounts()
deleteSubOrganization()
disconnectWalletAccount()
exportPrivateKey()
exportWallet()
exportWalletAccount()
fetchUser()
fetchWalletAccounts()
fetchWallets()
getActiveSessionKey()
getAllSessions()
getProxyAuthConfig()
getSession()
getWalletProviders()
importPrivateKey()
importWallet()
init()
initOtp()
loginOrSignupWithWallet()
loginWithOauth()
loginWithOtp()
loginWithPasskey()
loginWithWallet()
logout()
refreshSession()
removeOauthProviders()
removePasskeys()
removeUserEmail()
removeUserPhoneNumber()
setActiveSession()
signAndSendTransaction()
signMessage()
signTransaction()
signUpWithOauth()
signUpWithOtp()
signUpWithPasskey()
signUpWithWallet()
storeSession()
switchWalletProviderChain()
updateUserEmail()
updateUserName()
updateUserPhoneNumber()
verifyOtp()
switchWalletAccountChain()
fetchPrivateKeys()
TypeScript | Server
Golang
Rust
Ruby
CLI
Python
Web3 libraries
Advanced
Migration Path
SDK reference
switchWalletProviderChain()
Copy page
Copy page
Overview
Switches the specified wallet provider to a different blockchain chain.
Requires the wallet manager and its connector to be initialized.
The wallet provider must have at least one connected address.
Does nothing if the wallet provider is already on the desired chain.
Package:
core
Defined in:
core.ts:589
Parameters
walletProvider
WalletProvider
required
wallet provider to switch.
chainOrId
string | SwitchableChain
required
target chain as a chain ID string or SwitchableChain object.
Response
A successful response returns the following fields:
returns
void
required
A promise that resolves once the chain switch is complete.
Was this page helpful?
Yes
No
storeSession()
updateUserEmail()
Assistant
Responses are generated using AI and may contain mistakes.