Options
All
  • Public
  • Public/Protected
  • All
Menu

ZumoKit entry point. Refer to documentation for usage details.

Hierarchy

  • ZumoKit

Index

Properties

currentUser

currentUser: User | null = null

Currently signed-in user or null.

exchangeRates

exchangeRates: ExchangeRates

Mapping between currency pairs and available exchange rates.

transactionFeeRates

transactionFeeRates: TransactionFeeRates

Mapping between cryptocurrencies and available transaction fee rates.

utils

utils: Utils = new Utils()

Crypto utilities.

version

version: string = RNZumoKit.version

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

Methods

addChangeListener

  • addChangeListener(listener: () => void): void
  • Listen to changes in current user’s sign in state, exchange rates, exchange settings or transaction fee rates.

    Parameters

    • listener: () => void

      interface to listen to changes

        • (): void
        • Returns void

    Returns void

fetchHistoricalExchangeRates

getExchangeRate

getTransactionFeeRate

init

  • init(apiKey: string, apiUrl: string, txServiceUrl: string, cardServiceUrl: string, notificationServiceUrl: string, exchangeServiceUrl: string, custodyServiceUrl: string): void
  • Initializes ZumoKit SDK. Should only be called once.

    Parameters

    • apiKey: string

      ZumoKit API key

    • apiUrl: string

      ZumoKit API URL

    • txServiceUrl: string
    • cardServiceUrl: string

      ZumoKit Card Service URL

    • notificationServiceUrl: string

      ZumoKit Notification Service URL

    • exchangeServiceUrl: string

      ZumoKit Exchange Service URL

    • custodyServiceUrl: string

      ZumoKit Custody Service URL

    Returns void

onLog

  • onLog(listener: (logEntry: { data: any; level: LogLevel; message: string; process: number; thread: number; timestamp: number }) => void, logLevel: LogLevel): void
  • Sets log handler for all ZumoKit related logs.

    Parameters

    • listener: (logEntry: { data: any; level: LogLevel; message: string; process: number; thread: number; timestamp: number }) => void

      interface to listen to changes

        • (logEntry: { data: any; level: LogLevel; message: string; process: number; thread: number; timestamp: number }): void
        • Parameters

          • logEntry: { data: any; level: LogLevel; message: string; process: number; thread: number; timestamp: number }
            • data: any
            • level: LogLevel
            • message: string
            • process: number
            • thread: number
            • timestamp: number

          Returns void

    • logLevel: LogLevel

      log level, e.g. 'debug' or 'info'

    Returns void

removeChangeListener

  • removeChangeListener(listener: () => void): void
  • Remove change listener.

    Parameters

    • listener: () => void

      interface to listen to changes

        • (): void
        • Returns void

    Returns void

setLogLevel

  • Sets log level for current logger.

    Parameters

    • logLevel: LogLevel

      log level, e.g. 'debug' or 'info'

    Returns void

signIn

  • Signs in user corresponding to user token set. Sets current user to the newly signed in user. Refer to Server guide for details on how to get user token set.

    Parameters

    Returns Promise<User>

signOut

  • signOut(): Promise<void>

Legend

  • Property
  • Method
  • Inherited property
  • Static property

Generated using TypeDoc