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 steps for iOS

ZumoKit CocoaPod relies on Git LFS to store native libraries, there you will need to install git-lfs client to be able to use it.

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, '11.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, 
  TRANSACTION_SERVICE_URL, 
  CARD_SERVICE_URL,
  NOTIFICATION_SERVICE_URL
);

Ask your account manager to provide you with necessary 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"

CardStatus

CardStatus: "CREATED" | "ACTIVE" | "BLOCKED" | "SUSPENDED" | "FROZEN" | "EXPIRED" | "CANCELLED"

CardType

CardType: "VIRTUAL" | "PHYSICAL"

CurrencyCode

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

CurrencyType

CurrencyType: "CRYPTO" | "FIAT"

CustodyOrderStatus

CustodyOrderStatus: "NEW" | "PENDING" | "CONFIRMED" | "FAILED"

CustodyOrderType

CustodyOrderType: "DEPOSIT" | "WITHDRAW"

CustodyType

CustodyType: "CUSTODY" | "NON-CUSTODY"

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.

ExchangeSide

ExchangeSide: "BUY" | "SELL"

ExchangeStatus

ExchangeStatus: "PENDING" | "WITHDRAWING" | "CONFIRMED" | "FAILED"

HistoricalExchangeRates

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

LogLevel

LogLevel: "trace" | "debug" | "info" | "warning" | "error" | "critical" | "off"

Network

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

TimeInterval

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

TransactionDirection

TransactionDirection: "SENT" | "RECEIVED"

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" | "AUTHORISED" | "REVERSED" | "REFUNDED"

TransactionType

TransactionType: "CUSTODY" | "CUSTODY-DEPOSIT" | "CUSTODY-WITHDRAW" | "CRYPTO" | "FIAT" | "NOMINATED" | "CARD"

Legend

  • Property
  • Method
  • Inherited property
  • Static property

Generated using TypeDoc