Skip to main content
A user with USDC on Base or Polygon can fund a private balance on Solana without a Solana wallet. createCloak takes an EVM wallet, opens the account from its signature, and shields from Base or Polygon in one call.

What an EVM wallet can do

The signature must be a plain 65-byte key signature. Contract wallets (ERC-1271, ERC-4337) return something else and are refused. See Smart wallets.

Find the user’s EVM wallets

discoverEvmWallets() lists the wallets installed in the browser through EIP-6963. Each entry has info.name, info.icon and a provider. Pass the entry to createCloak.
window.ethereum works too. Pass it as the wallet.

Shield from Base or Polygon

The wallet sends one transfer on Base to a one-time receiving address derived from the account, and pays Base gas. The SDK shields the USDC when it arrives on Solana. The minimum is about 3 USDC; the live quote’s minimum is the one that counts. The route holds the money while it is between chains, and refunds an order it cannot fill to the wallet that sent it. If the page closes mid-way, the money waits at the receiving address and the SDK shields it on the next start, or when you call cloak.resume(). Route guarantees are in Cross-chain.

Using both a Solana and an EVM wallet

Pass both. The first that can sign opens the account and the other is linked to it, so either one opens the same account next time.

Server-side EVM keys

A viem WalletClient or an ethers Signer connected to a provider also works, for a backend that holds an EVM key. A bare key without a connection cannot send; wrap it in a WalletClient.

Errors you will see