Para Class
ThePara class is the main entry point for the Para Flutter SDK, providing wallet operations, authentication, and blockchain interactions. The latest version includes passkey authentication, comprehensive multi-chain support, and deep linking capabilities.
Constructor
Authentication Methods
Signs a user up or in with their email or phone and runs the whole flow to an authenticated session, including wallet creation. Recommended for new integrations. Every email or phone sign-in starts on a Para-hosted code page; a returning passkey account is then handed back for the native passkey prompt.
verificationCodeProvider is still required, but isn’t called while every sign-in starts on that page. Throws if a user is already signed in (already_authenticated; call logout() first), if the user closes a Para-hosted page (auth_cancelled) or cancels the passkey prompt (passkey_cancelled), or if verification fails. Errors thrown from verificationCodeProvider are rethrown unchanged. See Authenticate Users and Error codes.Signs a user up or in with an OAuth provider and runs the whole flow to an authenticated session. Recommended for new integrations. On Para’s updated authentication flow the provider sign-in runs on a Para-hosted page, then a new user creates their first credential (a native passkey when your app offers passkeys and the device can create one, otherwise a password or PIN on a Para-hosted page) and a returning passkey user signs in with their native passkey. Otherwise it runs the same flow as
verifyOAuth. Throws if the user cancels (auth_cancelled, oauth_cancelled, or passkey_cancelled), if the user picks a passkey that belongs to a different account (passkey_account_mismatch), or, on Para’s updated authentication flow, if a user is already signed in (already_authenticated; call logout() first). See Social Login.Signs a user in to Para with an external wallet they control. Recommended for new integrations. On Para’s updated authentication flow it asks the wallet to sign a sign-in message (a Sign-In With Ethereum message for EVM wallets) and verifies the signature. Supports EVM, Solana, and Cosmos wallets. This is a verify-only sign-in: every account, new or returning, is signed in once the signature is verified, no embedded Para wallet is created, and the session can’t sign with any embedded Para wallets the account already has. Otherwise it signs in with the wallet address like
loginExternalWallet, without asking for a signature. On both flows a session from an earlier wallet connect (such as ParaMetaMaskConnector.connect()) is logged out first. Throws if signMessage throws, if the signature can’t be verified, or, on Para’s updated authentication flow, if a user is already signed in to a Para account (call logout() first). See External Wallets.Starts the stage-based authentication flow for email or phone. Returns an
AuthState indicating next steps. The stage-based methods always use the code-entry flow; prefer authenticateWithEmailOrPhone for new integrations.Signs in an existing user from a
login stage with their preferred method (passkey or password).Completes signup for a new, verified user with the chosen method. Creates the passkey or password and then the user’s required wallets.
Runs the OAuth provider sign-in in a system browser sheet, then the passkey step: a new user creates a passkey and a returning user signs in with theirs. Always runs this provider-then-passkey flow; prefer
authenticateWithOAuth for new integrations.Signs in to Para with an external wallet address without asking the wallet for a signature. Prefer
authenticateWithExternalWallet for new integrations.Signs in an existing user with their passkey using the native passkey prompt. Pass the user’s email or phone to narrow the passkeys the device offers.
Wallet Management
Creates a new wallet with enhanced multi-chain support. Returns a
ParaFuture that can be cancelled.Signing Operations
Signs a message with the specified wallet. Returns a cancellable
ParaFuture. If a permissions policy requires approval, returns a DeniedSignatureResultWithUrl, and the handler set with setTransactionReviewHandler is called with its review URL.Signs a transaction for any supported chain. Returns a cancellable
ParaFuture. For EVM, the SuccessfulSignatureResult contains the complete RLP-encoded transaction ready for broadcasting in signedTransaction (also available as transactionData). See the EVM, Solana, Cosmos, and Stellar guides for chain-specific examples.Session Management
The SDK’s session state:
SessionStatus.restoring while it restores a saved session on launch, then authenticated or needsAuth. The SDK saves the session after each sign-in and restores it automatically when you create Para. See Session Management.Restores the saved session. The SDK already calls it when you create
Para, so you rarely need it. Returns true when a session was restored, or when the bridge already holds a live session. A saved session from a different environment is discarded.Utility Methods
Refreshes the current session metadata and returns the latest snapshot (or
null if nothing changed).Extension Methods
Para provides extension methods for the stage-based authentication flow. They’re exported frompackage:para/para.dart, so no extra import is needed.