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
Constructor
Creates a new Para SDK instance using the configuration factory constructor.
Authentication Methods
Future<AuthState>
Initiates authentication flow for email or phone. Returns an
AuthState indicating next steps.Future<AuthState>
Verifies the OTP code sent to email/phone during authentication.
Future<Wallet>
Handles login for existing users with passkey authentication.
Future<Wallet>
Handles the complete signup flow for new users, including passkey creation and wallet setup.
Future<AuthState>
Handles complete OAuth authentication flow using an external browser.
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.ParaFuture<SignatureResult>
Signs an EVM transaction. Returns a cancellable
ParaFuture.This method is for EVM transactions only. For Solana, use
signMessage() with the serialized transaction as messageBase64. For Cosmos, use signMessage() with cosmosSignDocBase64.EVM Transaction Return Value: The SuccessfulSignatureResult contains the complete RLP-encoded transaction ready for broadcasting via the signedTransaction property.Solana/Cosmos Return Value: For pre-serialized transactions, returns just the signature in signedTransaction. For constructed transactions, returns the complete signed transaction.Future<void>
Cancels an ongoing operation by its request ID.
Session Management
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 cleaner authentication flows (requires importing extensions):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.