Chain Management
wallet_switchEthereumChain
Request wallet to switch to a different Ethereum chain.chainId(string): Hex-encoded chain ID (e.g., “0x1” for mainnet)
null on success
Errors:
4001: User rejected the request4902: Unrecognized chain ID (chain not added to wallet)
wallet_addEthereumChain
Request wallet to add a new Ethereum chain.chainId(string): Hex-encoded chain IDchainName(string): Human-readable chain namenativeCurrency(object): Native currency infoname(string): Currency namesymbol(string): Currency symboldecimals(number): Currency decimals (typically 18)
rpcUrls(string[]): RPC endpoint URLsblockExplorerUrls(string[], optional): Block explorer URLsiconUrls(string[], optional): Chain icon URLs
null on success
Errors:
4001: User rejected the request4902: Chain already exists
Asset Management
wallet_watchAsset
Request wallet to track a token (typically ERC-20).type(string): Asset type (typically “ERC20”)options(object): Asset detailsaddress(string): Token contract addresssymbol(string): Token symboldecimals(number): Token decimalsimage(string, optional): Token icon URL
boolean - true if token was added, false if rejected
Errors:
4001: User rejected the request
Permissions
wallet_requestPermissions
Request specific permissions from the wallet.- Object with permission names as keys (e.g.,
eth_accounts)
4001: User rejected the request
wallet_getPermissions
Get currently granted permissions.wallet_revokePermissions
Revoke specific permissions.- Object with permission names to revoke as keys
null on success

