API Reference

SDK session, customization & activity management functions

  • initialize(): Initializes the Saakuru Mobile SDK by setting up the app configuration. Provide SDKConfig map with configuration values.
  • setupUserData(): Sets up the user data by fetching the user profile and user state. This function ensures that the user profile and user state are available for use.
  • loginWithSSO(): Performs the login process by sending an authorization token.
    refreshSession(): Refreshes the user session to extend the session expiration time.
  • openWallet(): For new users opens Signature creation flow. If a Signature is created - opens Wallet activity.
    getSessionActivityStatus(): Retrieves the current session activity status, which can be one of the values defined in the SessionActivityStatus enum.
  • logout(): Logs out the user by clearing the session data, signing out the wallet service
  • getExpireAt(): Retrieves the expiration timestamp of the user session
  • refreshSession(): Allows refreshing active session
  • sendTransaction(): Allows to initiate a signing action for sending assets from user's wallet to provided wallet address.
  • getUserCurrency(): Get currently set user fiat currency.
  • setUserCurrency(): Set current user fiat currency.
  • getSupportedCurrencies(): Get all supported fiat currencies.

SDK API management functions

Wallets:

  • getWallets(): Retrieves the user's wallets.
  • getWallet(): Retrieves a specific wallet based on the wallet ID. You need to provide the wallet ID.

Assets:

  • getCurrencies(): Retrieves the user's currencies.
  • getCurrency(): Retrieves a specific currency based on the currency ID. You need to provide the currency ID.
  • getNFTs(): Retrieves the user's NFTs (Non-Fungible Tokens) based on the wallet ID and optional search parameters. You can provide the wallet ID, a search string, and optional limit and offset values.

Transactions:

  • getTransactions(): Retrieves the transactions for a specific wallet and optional parameters. You need to provide the wallet ID and can optionally provide the asset reference, bip44 value, token address, page number, and offset.
  • getTransaction(): Retrieves a specific transaction based on the wallet ID, chain ID, and bip44 value. You need to provide the wallet ID, chain ID, and bip44 value.

Address book:

  • getUserContacts(): Retrieves the user's contacts from the address book.
  • getUserContactWithId(): Retrieves a specific contact based on the contact ID. You need to provide the contact ID.
  • addUserContact(): Add a new user's contact. You will need to provide name and wallet address.
  • updateUserContact(): Update a specific user's contact. You will need to provide contact id and data you want to change.
  • deleteUserContactWithId(): Delete a specific user's contact. You will need to provide contact id.

SDK UI management functions

  • getColorsScheme(): Retrieves currently set colors scheme.
  • setColorsScheme(): Sets current SDK colors scheme with the one provided.
  • getCurrentLanguage(): Retrieves currently set language locale.
  • setCurrentLanguage(): Set current language locale with the one provided.

SDK UI Theme Customization Guide

This guide provides detailed information on customizing the SDK's UI theme. Through the setColorsScheme function, you can dynamically change the UI's appearance to match your app's theme. Below are the customizable color values and their respective impacts on the SDK's UI components.

  • alwaysWhite: Used for text and icons that are consistently white for visibility, such as on action buttons or in headers on dark backgrounds.
  • alwaysBlack: Applied to text and icons that remain black to ensure readability, typically on lighter backgrounds.
  • primary: Highlights important interactive elements such as primary action buttons, active tabs, or selected states.
  • primary80: A slightly transparent primary color, ideal for hover states or secondary emphasis.
  • primary60: Further reduced opacity of the primary color for disabled states or less prominent interactive elements.
  • primary40: Provides a hint of color; used for subtle accents or to distinguish low-priority interactive elements.
  • primary20: The lightest shade of primary, suitable for background highlights or inactive UI components.
  • secondary: Designates secondary actions, often used for secondary buttons or informational icons.
  • secondary80/60/40/20/15: Variations of the secondary color used for gradients, shadows, or different interactive states such as hover, focus, or disable.
  • primaryButtonBg: The default background color for primary buttons.
  • primaryButtonBgDisabled: Indicates a primary button is inactive or non-interactive.
  • primaryButtonText: Color for text displayed on primary buttons.
  • secondaryButtonBg: Background color for secondary buttons.
  • secondaryButtonBgDisabled: Shows that a secondary button is currently not interactive.
  • secondaryButtonText: Text color for secondary buttons.
  • errorButtonBg: Background color for buttons associated with errors or destructive actions.
  • errorButtonText: Text color for error-related buttons.
  • green/greenBg: Represents success or confirmation; used for success messages, completed statuses, or affirmative actions.
  • yellow/yellowBg/yellow15: Denotes caution, warnings, or actions that require attention.
  • red/redBg: Alerts to errors, critical issues, or actions that could result in negative consequences.
  • blue/blueBg: Utilized for informational messages, interactive links, or focus indicators.
  • wireframes/wireframesLight: Typically used in UI elements that are placeholders or to outline interactive areas that are not yet active.
  • gradientLight/gradientViolet/gradientBlue: Employed for decorative accents, such as background gradients or visually appealing elements.
  • average: Transaction risk score warning text color.
  • background: The foundational background color used across the app's various screens and components.
  • background20: A lighter variant of the background color for hovered or selected items, providing a subtle visual cue.
  • white/white20/50/80: These provide a range of opacities for white color, used for text, backgrounds, borders, and overlays to create depth and focus.
  • black/black80/60/40/20/15/5/10: Similar to the white series, these offer various opacities for black color, applied to text, shadows, borders, and overlays to control emphasis and visibility.
  • pin: Specifically designated for bullet point indicators in pin creation/confirmation screens, distinguishing these elements visually.