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
Creates a new Para SDK instance using the v2 factory constructor.
Authentication Methods
Initiates authentication flow for email or phone. Returns an
AuthState
indicating next steps.Verifies the OTP code sent to email/phone during authentication.
Handles login for existing users with passkey authentication.
Handles the complete signup flow for new users, including passkey creation and wallet setup.
Handles complete OAuth authentication flow using an external browser.
Wallet Management
Creates a new wallet with enhanced multi-chain support. Returns a
ParaFuture
that can be cancelled.Retrieves all wallets for the current user.
Signing Operations
Signs a message with the specified wallet. Returns a cancellable
ParaFuture
.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.Cancels an ongoing operation by its request ID.
Session Management
Checks if there’s an active user session.
Exports the current session as an encrypted string.
Logs out the current user and clears session data.
Utility Methods
Gets the current user’s authentication details.
Waits for an ongoing login operation to complete.
Waits for wallet creation to complete after signup.
Formats a phone number for authentication.
Checks if the current user is using an external wallet.
Clears local storage data.
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
Initiates authentication and returns the current state using
Auth
helper class.Presents a password authentication URL in a secure web view.