- Embedded wallet
- Server wallet
Use this path when Magic authenticates and signs in the browser.The Magic key in this snippet is publishable. Keep the Rhinestone API key and any Magic secret key server-side.
1
Install and initialize Magic
2
Authenticate and create a viem account
Magic embedded wallets do not support
wallet_switchEthereumChain, which the Rhinestone signing flow can request. Ignore only chain add and switch requests, and forward every other RPC method to Magic. The wrapper also converts bigint values before typed-data signing.3
Create the Rhinestone account
Authenticate the browser SDK with short-lived JWTs from your backend:See security for secure token issuance and sponsored-intent extension tokens.