Pre-generated Wallets
Pre-generated wallets allow you to create wallet addresses for your users without requiring them to add any additional security methods (like a passkey) up front. You have the option of either creating the wallet within the signup flow after the customer authenticates their email, or creating it outside the signup flow by providing their email address to our API and getting the new wallet address in the response.
A customer can receive funds into their wallet but must set up a passkey before they are able to perform any actions that require using the wallet such as sending on-chain transaction or signing an off-chain message.
What can I do with pre-generated wallets?
- Pre-create a wallet for your users as part of the invite flow before they log in to your app for the first time.
- Defer the passkey setup for a new wallet until the end user needs to make their first on-chain interaction.
- Prefund wallets with tokens based on any off-chain activities before a user claims the wallet itself.
How do I create pre-generated wallets for my users?
Before signup
Use the createEmbeddedWallet API to create a wallet based on an email address at any time without any user interaction.
After signup
Automatically
Under the embedded wallets section in the dashboard, you can enable pre-generated wallets under the “Wallet Claim Behavior” heading.
If you toggle on the “On first transaction” option, a pre-generated wallet will be created for the user. They will be prompted to add a passkey when they need to perform an action with their wallet for the first time.
That’s compared to the second option (“On signup”) which will require the user to add a passkey before they can continue with the sign-up flow.
If “Manual Mode” is turned off, the wallet will be created automatically on signup.
Manually
If “Manual Mode” is turned on, you must trigger the wallet creation yourself using the SDK with the createEmbeddedWallet hook which comes as part of the useEmbeddedWallet hook.
FAQ
How does Dynamic and the Developer remain non-custodial
How does Dynamic and the Developer remain non-custodial
- Wallets are created and bound to the user’s email address.
- The private key to the wallet is stored with our KMS provider and the policy engine is configured such that only the end-user can take action on it. The keys are only ever used within secure enclaves.
- No party except the end-user can change anything on the wallet
- The wallet address information is public, which allows you or anyone to fund this wallet
- When the end-user wants to transact with their wallet, they will be prompted to add a security credential like a passkey which gets associated with their account.
Can a user change their associated email address for a pre-generated wallet?
Can a user change their associated email address for a pre-generated wallet?
No, a user cannot change their email address once they have created a pre-generated wallet. If they need to change their email address, they will need to create a new wallet.