Skip to main content
Magic offers client-side embedded wallets and server wallets. Both can provide the ECDSA signatures required by a Rhinestone smart account, but they use different trust boundaries. For Solana, see the common authority recipe and remote signer requirements. This guide covers Ethereum signers, not a new vendor Solana integration; Ed25519 wallets are not supported Swig authorities.
Use this path when Magic authenticates and signs in the browser.
1

Install and initialize Magic

These examples target SDK 3.0.0, which is not released yet. The install command below requires its publication; the current v2 package does not support these APIs.
The Magic key in this snippet is publishable. Keep the Rhinestone API key and any Magic secret key server-side.
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.
For sponsored transactions, follow sponsorship setup. For the transaction lifecycle, continue to send a transaction.