SDK Functions Overview
Learn about how to use Okto's SDK functionalities.
The Okto React Native 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
| Function | Description | 
|---|---|
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
| Function | Description | 
|---|---|
isLoggedIn() | Indicates if user is currently logged in | 
logOut() | Logs out current user | 
User Management
| Function | Description | 
|---|---|
getUserDetails() | Get details of the currently authenticated user | 
Portfolio Management
| Function | Description | 
|---|---|
getPortfolio() | Get portfolio details of the current user | 
Network and Token Information
| Function | Description | 
|---|---|
getSupportedNetworks() | Gets list of whitelisted networks | 
getSupportedTokens() | Gets list of whitelisted tokens | 
Wallet Management
| Function | Description | 
|---|---|
getWallets() | Get all wallets of current user | 
createWallet() | Create a new wallet for current user | 
Order Management
| Function | Description | 
|---|---|
orderHistory(query) | Fetch order history | 
NFT Operations
| Function | Description | 
|---|---|
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
| Function | Description | 
|---|---|
transferTokens(data) | Transfer tokens based on the provided data | 
transferTokensWithJobStatus(data) | Transfer tokens and provides job status updates based on the provided data | 
Read From Contract
| Function | Description | 
|---|---|
readContractData(network_name, data) | Read data from any smart contract on supported chains | 
Raw Transactions
| Function | Description | 
|---|---|
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
| Function | Description | 
|---|---|
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 |