Options
All
  • Public
  • Public/Protected
  • All
Menu

Entry point to ZumoKit React Native SDK:

import ZumoKit from 'react-native-zumo-kit';

Once ZumoKit is initialized, this class provides access to user retrieval, ZumoKit state object and historical exchange rates. State change listeners can be added and removed.

See Getting Started guide for usage details.

Hierarchy

  • ZumoKit

Index

Properties

Private emitter

emitter: NativeEventEmitter = new NativeEventEmitter(RNZumoKit)

Private listeners

listeners: Array<(state: State) => void> = []

state

state: State

Current ZumoKit state. Refer to ZumoKit State guide for details.

version

version: string = RNZumoKit.version

ZumoKit SDK semantic version tag if exists, commit hash otherwise.

Methods

addStateListener

  • addStateListener(listener: (state: State) => void): void
  • Listen to all state changes. Refer to ZumoKit State guide for details.

    Parameters

    • listener: (state: State) => void

      interface to listen to state changes

        • Parameters

          Returns void

    Returns void

clear

  • clear(): Promise<void>
  • Clear ZumoKit SDK state. Should be called when user logs out.

    Returns Promise<void>

getHistoricalExchangeRates

  • Fetch historical exchange rates for supported time intervals. On success callback returns historical exchange rates are contained in a mapping between time interval on a top level, from currency on second level, to currency on third level and ExchangeRate objects.

    Returns Promise<HistoricalExchangeRates>

getUser

  • Get user corresponding to user token set. Refer to Server guide for details on how to get user token set.

    Parameters

    Returns Promise<User>

init

Private notifyStateListeners

  • notifyStateListeners(): void

removeStateListener

  • removeStateListener(listener: (state: State) => void): void
  • Remove listener to state changes. Refer to ZumoKit State guide for details.

    Parameters

    • listener: (state: State) => void

      interface to listen to state changes

        • Parameters

          Returns void

    Returns void

Legend

  • Property
  • Method
  • Private property
  • Private method
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc