Overview
ThePortalFeatureFlags class is used to configure feature flags when initializing the Portal SDK. Each flag corresponds to a specific feature or behavior that can be toggled on or off. All flags are optional and immutable after initialization — they cannot be changed at runtime.
Enabling feature flags
PassfeatureFlags when calling portal.initialize():
Available flags
useEnclaveMpcApi
- Type:
bool? - Default:
null(disabled) - Description: Enables the use of the Enclave MPC API for signing transactions. When enabled, MPC operations are executed server-side in a secure AWS Nitro Enclave, ensuring consistent and faster signing times.
useEnclaveMpcApi flag, the client key share is transmitted to a Trusted Execution Environment (TEE) hosted in an AWS Nitro Enclave. This ensures:
- Encrypted memory: All data processed in the enclave is encrypted and inaccessible to anyone, including Portal employees.
- Verified execution: Users can cryptographically verify that their request was handled in a secure enclave using signed measurements.
usePresignatures
- Type:
bool? - Default:
null(disabled) - Description: Enables the automatic use of presignatures to improve signing latency for EVM transactions.
usePresignatures is enabled, the SDK automatically generates and uses presignatures in the background. This reduces the time required for transactions to be signed, as the SDK pre-computes part of the MPC signing flow. Users do not need to take any additional actions — the SDK handles presignature generation and consumption automatically.
Presignatures currently only support the
SECP256K1 curve (EVM, Bitcoin). ED25519 (Solana) signing is unaffected by this flag — support is coming soon.Important notes
- All feature flags are set at initialization time and cannot be changed at runtime.
- Each flag is optional (
bool?) — you only need to set the flags you want to enable. - Flags not specified will use their default behavior (disabled).