SDK Functions Overview

Learn about how to use Okto's SDK functionalities.

The Okto Flutter SDK provides a comprehensive set of functions to manage user authentication, portfolio data, supported networks and tokens, user details, wallet management, order history, NFT order details, transaction statuses, token and NFT transfers, raw transaction executions, and UI theme settings.

Below is an overview of the available functions and their respective purposes.

Authentication Functions

FunctionDescription
authenticate(idToken, callback)Authenticates user with Google OAuth
sendEmailOTP(email)Sends OTP to user's email
verifyEmailOTP(email, otp, token)Verifies email OTP
sendPhoneOTP(phoneNumber, countryShortName)Sends OTP to user's phone
verifyPhoneOTP(phoneNumber, countryShortName, otp, token)Verifies phone OTP
showOnboardingModal()Presents a guided onboarding flow to the user

Session Management

FunctionDescription
isLoggedIn()Indicates if user is currently logged in
logOut()Logs out current user

User Management

FunctionDescription
getUserDetails()Get details of the currently authenticated user

Portfolio Management

FunctionDescription
getPortfolio()Get portfolio details of the current user

Network and Token Information

FunctionDescription
getSupportedNetworks()Gets list of whitelisted networks
getSupportedTokens()Gets list of whitelisted tokens

Wallet Management

FunctionDescription
getWallets()Get all wallets of current user
createWallet()Create a new wallet for current user

Order Management

FunctionDescription
orderHistory(query)Fetch order history

NFT Operations

FunctionDescription
transferNft(data)Transfer NFTs based on the provided data
transferNftWithJobStatus(data)Transfer NFTs and provides job status updates based on the provided data
getNftOrderDetails(query)Fetches details of a specific NFT order based on the provided query

Token Operations

FunctionDescription
transferTokens(data)Transfer tokens based on the provided data
transferTokensWithJobStatus(data)Transfer tokens and provides job status updates based on the provided data

Raw Transactions

FunctionDescription
executeRawTransaction(data)Executes a raw transaction based on the provided data
executeRawTransactionWithJobStatus(data)Executes a raw transaction and provides job status updates based on the provided data
getRawTransactionStatus(query)Fetch raw transactions based on the provided data

UI Management

FunctionDescription
showWidgetModal()Displays the widget modal
closeModal()Closes the currently open modal
getTheme()Retrieves the current UI theme
setTheme(theme)Sets the UI theme based on the provided theme object

On this page