Options
All
  • Public
  • Public/Protected
  • All
Menu

ZumoKit Web SDK

npm (tag)

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

ZumoKit is distributed through NPM repository and it has a couple of peer dependencies that also need to be installed:

npm install node-fetch@^2.6.2 ws@^8.5.4 decimal.js@^10.2.0 zumokit

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. Behind the scenes, it will load ZumoKit WebAssembly module. ZumoKit requires node environment to work as expected and it will not work in in a browser environment.

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

Replace API_KEY, API_URL, TRANSACTION_SERVICE_URL, CARD_SERVICE_URL, NOTIFICATION_SERVICE_URL, EXCHANGE_SERVICE_URL and CUSTODY_SERVICE_URL in the examples below with credentials provided to you by your account manager.

import { loadZumoKit } from 'zumokit';

const zumokit = await loadZumoKit(
  API_KEY,
  API_URL,
  TRANSACTION_SERVICE_URL,
  CARD_SERVICE_URL,
  NOTIFICATION_SERVICE_URL,
  EXCHANGE_SERVICE_URL,
  CUSTODY_SERVICE_URL
);

console.log(zumoKit.version);

TypeScript support

This package exports TypeScript declarations for ZumoKit type aliases and interfaces via named exports. For example:

import { CurrencyCode, AccountType, Network } from 'zumokit';

Example

The example project demonstrates the expected user flow, including authentication process, wallet creation and transaction submission.

NOTE: You need to install git-lfs to be able to clone this repository:

  • brew install git-lfs
  • git lfs install

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"

Functions

Const loadZumoKit

  • loadZumoKit(apiKey: string, apiUrl: string, transactionServiceUrl: string, cardServiceUrl: string, notificationServiceUrl: string, exchangeServiceUrl: string, custodyServiceUrl: string): Promise<ZumoKit>
  • Entry point to ZumoKit Web SDK.

    This function returns a Promise that resolves with a newly created ZumoKit object once ZumoKit SDK has loaded. Behind the scenes, it will load ZumoKit WebAssembly module. ZumoKit requires node environment to work as expected and it will not work in a browser environment.

    Parameters

    • apiKey: string

      ZumoKit API Key

    • apiUrl: string

      ZumoKit API URL

    • transactionServiceUrl: string

      ZumoKit Transaction Service URL

    • 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 Promise<ZumoKit>

    ZumoKit instance

Legend

  • Property
  • Method
  • Property
  • Inherited property
  • Static property

Generated using TypeDoc