Overview
Feature flags are set on thefeatureFlags option when you create a Portal instance. They control optional behavior such as signing performance and backup options. You do not need to change your signing or wallet code when enabling flags—the SDK adapts automatically.
Enabling feature flags
PassfeatureFlags in the Portal constructor:
Available flags
usePresignatures
- Type:
boolean - Default:
false - Description: When enabled, the SDK uses presignatures to improve signing latency. You do not call any presignature APIs yourself; the SDK generates presignatures in the background and uses them automatically when you sign (e.g. via
portal.request()orportal.rawSign()).
usePresignatures when you want lower latency on EVM signing without changing your integration. The SDK fills a small buffer after wallet creation or recovery and replenishes it as presignatures are used.
Limitations
- Applies only to SECP256K1 (EVM) signing. Solana (ED25519) signing is unchanged.
- Presignatures are single-use; the SDK manages creation and consumption for you.
usePreGeneratedWallet
- Type:
boolean - Default:
false - Description: When enabled,
portal.createWallet()attempts to claim a pre-generated wallet share instead of running the standard interactive MPC generation. This can make wallet creation faster. You do not need to change how you callcreateWallet.
createWallet runs the interactive MPC key generation protocol in real time. With this flag enabled, the SDK first tries to claim a share from a pre-computed pool. If that fails with an HTTP 5xx response from the enclave, the SDK automatically falls back to the standard generation flow—the fallback is transparent, and createWallet resolves or rejects exactly as it would through the standard flow. Failures that aren’t a 5xx (for example, a malformed request or a network failure) are not retried and propagate as usual.
When to enable
Enable usePreGeneratedWallet when you want faster wallet creation without changing your integration. The resulting wallet is identical to one created through the standard flow.
Limitations
- This is a performance optimization only; it doesn’t change the API surface, the resulting wallet, or how backup/recovery works.
Reference
For all constructor options and thefeatureFlags property, see the Web SDK Reference.