Skip to main content

Para Class

The Para 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

Constructor
Creates a new Para SDK instance using the configuration factory constructor.

Authentication Methods

Future<AuthenticationResult>
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.
Future<AuthenticationResult>
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.
Future<AuthenticationResult>
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.
Future<AuthState>
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.
Future<AuthState>
Verifies the OTP code sent to email/phone during authentication.
Future<void>
Signs in an existing user from a login stage with their preferred method (passkey or password).
Future<void>
Completes signup for a new, verified user with the chosen method. Creates the passkey or password and then the user’s required wallets.
Future<AuthState>
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.
ParaFuture<void>
Signs in to Para with an external wallet address without asking the wallet for a signature. Prefer authenticateWithExternalWallet for new integrations.
ParaFuture<Wallet>
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

ParaFuture<Wallet>
Creates a new wallet with enhanced multi-chain support. Returns a ParaFuture that can be cancelled.
ParaFuture<List<Wallet>>
Retrieves all wallets for the current user.

Signing Operations

ParaFuture<SignatureResult>
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.
ParaFuture<SignatureResult>
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.
Future<void>
Cancels an ongoing operation by its request ID.

Session Management

ValueListenable<SessionStatus>
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.
Future<bool>
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.
ParaFuture<bool>
Extends the current session. Returns false when the session has already expired.
ParaFuture<bool>
Checks if there’s an active user session.
ParaFuture<String>
Exports the current session as an encrypted string.
ParaFuture<void>
Logs out the current user and clears session data.

Utility Methods

ParaFuture<ParaUser>
Gets the current user’s basic profile and session status.
ParaFuture<String>
Returns a browser URL for One-Click (BASIC_LOGIN) authentication.
Future<Uri?>
Presents an auth URL in a secure system web view and returns the callback URI (if any).
ParaFuture<Map<String, dynamic>>
Waits for an ongoing login operation to complete.
ParaFuture<bool>
Polls for completion of a pending One-Click signup.
ParaFuture<Map<String, dynamic>>
Waits for wallet creation to complete after signup.
ParaFuture<Map<String, dynamic>?>
Refreshes the current session metadata and returns the latest snapshot (or null if nothing changed).
String?
Formats a phone number for authentication.
ParaFuture<bool>
Checks if the current user is using an external wallet.
ParaFuture<void>
Clears local storage data.
void
Disposes of SDK resources. Call when the SDK is no longer needed.

Extension Methods

Para provides extension methods for the stage-based authentication flow. They’re exported from package:para/para.dart, so no extra import is needed.

ParaAuthExtensions

Future<AuthState>
Initiates authentication and returns the current state using Auth helper class.
Future<Uri?>
Presents a password authentication URL in a secure web view.

Types and Enums

Environment

Auth

AuthState

SignupMethod

OAuthMethod

WalletType

ParaFuture

AuthenticationResult

Wallet

SignatureResult