Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt

Use this file to discover all available pages before exploring further.

Final Class Configuration for CrossmintWalletProvider.
final class CrossmintWalletProviderConfig
Provide either a clientConfig (the provider builds dependencies for you) or a fully-formed dependencies bundle. Both together is invalid. Most apps want the clientConfig path:
CrossmintWalletProvider(
  config: CrossmintWalletProviderConfig(
    clientConfig: CrossmintClientConfig(
      apiKey: 'YOUR_STAGING_API_KEY',
      appScheme: 'com.your.app',
    ),
    walletControllerConfig: CrossmintWalletControllerConfig(
      createOnLogin: CrossmintCreateOnLoginConfig(
        chain: 'base-sepolia',
        recovery: const CrossmintEmailSignerConfig(),
      ),
    ),
  ),
  child: CrossmintWalletGate(...),
);

Constructors

CrossmintWalletProviderConfig

const CrossmintWalletProviderConfig({
  this.clientConfig,
  this.walletControllerConfig = const CrossmintWalletControllerConfig(),
  this.dependencies,
  this.disposeInjectedDependencies = false,
  this.authLinkProvider,
  this.startAuthCallbackRouter = true,
  this.autoLoadWallet = true,
  this.jwt,
  this.otpPromptBuilder,
  this.mountBridgeHosts = true,
})
Creates a provider config. Either clientConfig or dependencies must be non-null.

Properties

clientConfig

final CrossmintClientConfig? clientConfig
Config used to build a new CrossmintClient. Mutually exclusive with dependencies.

walletControllerConfig

final CrossmintWalletControllerConfig walletControllerConfig
Config for the wallet controller the provider creates.

dependencies

final CrossmintWalletProviderDependencies? dependencies
Pre-built dependencies — use this when you want to share a client or controller between mount points. Mutually exclusive with clientConfig.

disposeInjectedDependencies

final bool disposeInjectedDependencies
When the provider was handed pre-built dependencies, controls whether they are disposed alongside the provider. Defaults to false — the caller retains ownership.

authLinkProvider

final CrossmintAuthLinkProvider? authLinkProvider
Optional resolver for the OAuth callback URL. Leave null to use the default deep-link resolver.

startAuthCallbackRouter

final bool startAuthCallbackRouter
When true (default) the provider starts CrossmintAuthCallbackRouter automatically so OAuth redirects land correctly.

autoLoadWallet

final bool autoLoadWallet
When true (default) the provider triggers ensureLoaded() on the wallet controller once a session is detected.

jwt

final String? jwt
BYOA JWT — when supplied, the provider seeds auth.setJwt(jwt) on startup (Bring Your Own Auth). Apps not using BYOA can leave this null.

otpPromptBuilder

final CrossmintOtpPromptBuilder? otpPromptBuilder
Builder for the default OTP prompt UI — pass crossmintDefaultOtpPromptBuilder for the Material default. Leave null to drive OTP UI headlessly via walletController.otp.

mountBridgeHosts

final bool mountBridgeHosts
When true (default) the provider mounts CrossmintWalletHost so the hidden signer bridge has a place to run. Set to false only if your subtree already hosts the bridge.

Methods

isEquivalentTo

bool isEquivalentTo(CrossmintWalletProviderConfig other)