Overview
Wallet creation normally runs the MPC key generation (DKG) protocol interactively between the device and the MPC servers at the momentcreateWallet is called. Pre-generated wallets let the SDK instead claim a share that was already computed ahead of time from a standing pool, which can make wallet creation noticeably faster.
This is entirely opt-in and transparent to your integration: you don’t call any new APIs, and the shape of createWallet doesn’t change. You only need to enable a feature flag when initializing Portal.
How It Works
Key Details
Best Practices
- Treat it as a pure performance optimization. Enable the flag to reduce wallet creation latency; no other integration changes are needed.
- Keep your existing error handling around
createWallet. The SDK already falls back automatically where it can—your existing error handling forcreateWalletcontinues to cover the cases that aren’t recoverable.
SDK behavior
Enable pre-generated wallets with theusePreGeneratedWallet feature flag. With the flag enabled, the SDK attempts to claim a pre-generated share on createWallet and falls back to the standard MPC generation flow automatically if that attempt fails with an HTTP 5xx response from the enclave.
Next Steps
Ready to use pre-generated wallets? Choose your platform:- Flutter — Enable the
usePreGeneratedWalletfeature flag when initializing Portal - React Native — Enable the
usePreGeneratedWalletfeature flag when initializing Portal - Web — Enable the
usePreGeneratedWalletfeature flag when initializing Portal