Skip to main content
With Privy, you can pregenerate self-custodial Ethereum and Solana wallets for existing users, or create a new user with other login methods, like an email address or phone number, without requiring the user to login. You can even send assets to the wallet before the user logs in to your app for the first time. Once the user associated with the account logs in, they will be able to access the pregenerated wallet and any assets sent to them. Wallet pregeneration is useful for:
  • Airdrops and rewards: Distribute tokens or NFTs to users before they sign up
  • Web2 to web3 migrations: Import existing users from a database and provision wallets for them
  • Frictionless onboarding: Allow users to receive assets before creating an account
  • Server-side provisioning: Generate wallets programmatically based on off-chain events or criteria
This recipe covers three scenarios: creating wallets for new users, adding wallets to existing users, and batch importing users with wallets.

Pregenerating wallets for new users

Create new users with pregenerated wallets in a single operation. This is useful for airdrops, migrations, or any scenario where wallets need to exist before authentication.

Creating wallets for existing users

Add additional embedded wallets to users who already have Privy accounts. This is useful when expanding to support new chains or creating wallets based on in-app actions.

Batch importing users with wallets

Import multiple users with pregenerated wallets in a single batch operation. This is more efficient than creating users individually when provisioning wallets for hundreds or thousands of users at once.

What happens when users log in

When users log in for the first time after wallets have been pregenerated, the wallets automatically appear in their account. Users can immediately access these wallets and any assets that were sent to them. These wallets work identically to wallets created during login. Users can sign transactions, view balances, and manage their assets through the standard application interface.