Skip to main content

Wallet Pregeneration

Web3Auth’s Pregenerated Wallets feature simplifies user onboarding by creating wallets for your users before they log in. This approach enables a smoother Web3 experience, giving developers flexibility in introducing wallet functionalities to users at the right time.

Why Use Pregenerated Wallets?

  • Seamless Onboarding: Create wallets as part of the invite or signup process, so users can jump into your app without additional steps.
  • Deferred Wallet Setup: Delay login setups (e.g., OAuth or passkeys) until users are ready for their first on-chain transaction.
  • Pre-Funding Capability: Send tokens or rewards to wallets before users claim them, perfect for airdrops, welcome bonuses, or preloaded assets.

Use Cases

  • Early Wallet Creation: Assign wallets to users during onboarding or invitations without requiring immediate login.
  • Preloaded Incentives: Reward users with tokens, NFTs, or other assets for off-chain activities, redeemable when they access their wallets.
  • Enhanced Gaming & App Experiences: Preload game items or promotional rewards to create a frictionless user journey.

Utilizing the Pregenerated Wallet API

Web3Auth provides a straightforward API to facilitate the creation of pre-generated EOA wallets. You can integrate this API into your user signup flow, either after a user verifies their email or independently by supplying their email or unique identifier to the API.

note

Access to Wallet Pregeneration is gated. You can use this feature in sapphire_devnet for free. The minimum pricing plan to use this feature in a production environment is the Scale Plan.

warning

This API only returns the Core Kit Key wallet addresses. To use the wallet addresses with the Web3Auth SDKs, you will need to either use the useCoreKitKey flag in our PnP SDKs or use any of our Single Factor Auth SDKs

Learn more about how keys can change within different Web3Auth Products

Implementation Steps

  1. Identify Users: Determine the unique identifier or email for the user within your system. This will be the verifierId used to create the wallet.
  2. API Call: Use the provided API to submit the user's identifier. You'll need to specify parameters from the Web3Auth dashboard, specifically the Verifier Name, Web3Auth Network, and Client Id.
  3. Receive Wallet Address: The API response will include the new wallet address, ready for use by the user upon their first login.

HTTP Request

GET https://lookup.web3auth.io/lookup?verifier=w3a-google-demo&verifierId=devrel@web3auth.io&web3AuthNetwork=sapphire_mainnet&clientId=BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ&
ParameterDescriptionValue
verifierThe verifier name can be found on your Web3Auth dashboard. To learn more about verifiers, click here.
verifierIdThe verifier ID value. One of the ways to get it is via the response to the getUserInfo() method.
web3AuthNetworkName of the Web3Auth network your project is deployed on.
clientIdThe client ID for your project. This can also be found on the Web3Auth dashboard.

Edit parameters and click submit to see the response in the terminal.

Response

Pre-generate Smart Accounts

Web3Auth provides a straightforward API to facilitate the creation of pre-generated Smart Accounts. You can integrate this API into your user signup flow, either after a user verifies their email or independently by supplying their email or unique identifier to the API.

Implementation Steps

  1. Identify Users: Determine the unique identifier or email for the user within your system. This will be the verifierId used to create the wallet.
  2. API Call: Use the provided API to submit the user's identifier. You'll need to specify parameters from the Web3Auth dashboard, specifically the Verifier Name, Web3Auth Network, and Client Id.
  3. Receive Wallet Address: The API response will include the new wallet address, ready for use by the user upon their first login.

HTTP Request

GET https://lookup.web3auth.io/lookup/scw?verifier=w3a-google-demo&verifierId=devrel@web3auth.io&web3AuthNetwork=sapphire_mainnet&clientId=BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ&chainId=0x1&smartAccountType=safe&entryPointVersion=0.7&
ParameterDescriptionValue
verifierThe verifier name can be found on your Web3Auth dashboard. To learn more about verifiers, click here.
verifierIdThe verifier ID value. One of the ways to get it is via the response to the getUserInfo() method.
web3AuthNetworkName of the Web3Auth network your project is deployed on.
clientIdThe client ID for your project. This can also be found on the Web3Auth dashboard.
chainIdChain Id for the chain you want to pre-generate Smart account. The `chainId` should be hex value.
smartAccountTypeThe Smart Account provider you want to use.
entryPointVersionThe entry point version for the Smart Account. Please note, some SCW currently only work with specific entry point version (biconomy - 0.6, nexus - 0.7, trust - 0.6) so setting entryPointVersion for those SCW will have no effect.
smartAccountVersion?Smart Account version for the Smart Account Provider contract. This parameter is optional.
saltNonce?Salt nonce for the Smart Account to add randomness or predictability when the address is generated. This parameter is optional.
factoryAddress?Specifies the address of the Factory Contract. While providers typically deploy the factory contract on popular chains, you have the option to deploy your own factory contract on any chain and pass its address. This parameter is optional.

Edit parameters and click submit to see the response in the terminal.

Response