Options
All
  • Public
  • Public/Protected
  • All
Menu

ZumoKit React Native SDK

ZumoKit is a state of the art wallet architecture underpinning our flagship product Zumo that provides secure transfer and exchange of fiat and cryptocurrency funds.

Docs

Refer to ZumoKit SDK developer documentation and reference for usage details.

Installation

Install the package:

yarn add zumo/zumokit-react-native

Link the library (not required for React Native 0.60 and up):

react-native link react-native-zumo-kit

ZumoKit React Native SDK uses experimental TypeScript decorators, support for which has to be enabled:

yarn add @babel/plugin-proposal-decorators -D

Then, enable plugin @babel/plugin-proposal-decorators in babel.config.json:

plugins: [["@babel/plugin-proposal-decorators", { "legacy": true }]]

If your project uses typescript, modify compilerOptions in tsconfig.json:

"experimentalDecorators": true

Extra step for iOS

As ZumoKit is not yet distributed via CocoaPods Trunk, you'll need to include the ZumoKit Spec repo in your app's Podfile (usually located in the ios directory). You'll also need to ensure that the minimum iOS target is 10.0 or higher.

platform :ios, '10.0'

source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/zumo/zumokit-specs.git'

target 'Demo' do
  # ...

  pod 'RNZumoKit', :path => '../node_modules/react-native-zumo-kit'

end

You will also need to execute pod install manually from the ios directory.

Extra step for Android

Set minSdkVersion to 21 in your android/build.gradle settings.

Usage

Entry point to ZumoKit SDK is loadZumoKit function. This function returns a Promise that resolves with a newly created ZumoKit object once ZumoKit SDK has loaded.

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

zumokit.init(API_KEY, API_URL, TX_SERVICE_URL);

Ask your account manager to provide you with neccesarry credentials.

ZumoKit module exports TypeScript declarations for ZumoKit types and interfaces via named exports. For example:

import { Account, Transaction, Exchange } from 'zumokit';

Index

Type aliases

AccountType

AccountType: "STANDARD" | "COMPATIBILITY" | "SEGWIT"

CurrencyCode

CurrencyCode: "BTC" | "ETH" | "USD" | "GBP" | "EUR"

CurrencyType

CurrencyType: "CRYPTO" | "FIAT"

Dictionary

Dictionary<K, T>: Partial<Record<K, T>>

Type parameters

  • K: string

  • T

ExchangeRates

Exchange rates are contained in a mapping between from currency, to currency and exchange rates.

ExchangeSettings

Exchange settings are contained in a mapping between from currency, to currency and exchange settings.

ExchangeStatus

ExchangeStatus: "PENDING" | "DEPOSITED" | "CONFIRMED" | "FAILED" | "RESUBMITTED" | "CANCELLED" | "PAUSED" | "REJECTED"

HistoricalExchangeRates

Historical exchange rates are contained in a mapping between time interval, from currency, to currency on third level and exchange rates.

Network

Network: "MAINNET" | "TESTNET" | "RINKEBY" | "ROPSTEN" | "GOERLI"

TimeInterval

TimeInterval: "hour" | "day" | "week" | "month" | "quarter" | "year"

TransactionFeeRates

Transaction fee rates are contained in a mapping between crypto currency and tranfaction fee rate.

TransactionStatus

TransactionStatus: "PENDING" | "CONFIRMED" | "FAILED" | "RESUBMITTED" | "CANCELLED" | "PAUSED" | "REJECTED"

TransactionType

TransactionType: "CRYPTO" | "EXCHANGE" | "FIAT" | "NOMINATED"

Legend

  • Property
  • Method
  • Inherited property
  • Static property

Generated using TypeDoc