ZumoKit

Objective-C

@interface ZumoKit : NSObject

Swift

class ZumoKit : NSObject

Entry point to ZumoKit iOS SDK.

See Getting Started guide for usage details.

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

    Declaration

    Objective-C

    + (nonnull NSString *)version;

    Swift

    class func version() -> String
  • Initializes ZumoKit SDK. Should only be called once.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithApiKey:(nonnull NSString *)apiKey
                                    apiUrl:(nonnull NSString *)apiUrl
                              txServiceUrl:(nonnull NSString *)txServiceUrl;

    Swift

    init(apiKey: String, apiUrl: String, txServiceUrl: String)

    Parameters

    apiKey

    ZumoKit Api-Key

    apiUrl

    ZumoKit API url

    txServiceUrl

    ZumoKit Transaction Service url

    Return Value

    ZumoKit instance

  • Authenticates user token set and returns corresponding user. On success user is set as active user. Refer to Server guide for details on how to get user token set.

    See

    ZKUser

    Declaration

    Objective-C

    - (void)authUser:(nonnull NSString *)userTokenSet
          completion:(UserCompletionBlock _Nonnull)completion;

    Swift

    func authUser(_ userTokenSet: String, completion: @escaping UserCompletionBlock)

    Parameters

    userTokenSet

    user token set

    completion

    completion block to receive the result or error

  • Get active user if exists.

    Declaration

    Objective-C

    - (nullable ZKUser *)getActiveUser;

    Swift

    func getActiveUser() -> ZKUser?

    Return Value

    active user or null

  • Get crypto utils.

    Declaration

    Objective-C

    - (nonnull ZKUtils *)getUtils;

    Swift

    func getUtils() -> ZKUtils

    Return Value

    crypto utils

  • Get exchange rate for selected currency pair.

    Declaration

    Objective-C

    - (nullable ZKExchangeRate *)getExchangeRate:(nonnull NSString *)fromCurrency
                                      toCurrency:(nonnull NSString *)toCurrency;

    Swift

    func getExchangeRate(_ fromCurrency: String, toCurrency: String) -> ZKExchangeRate?

    Parameters

    fromCurrency

    currency code

    toCurrency

    currency code

  • Get exchange settings for selected currency pair.

    Declaration

    Objective-C

    - (nullable ZKExchangeSettings *)
        getExchangeSettings:(nonnull NSString *)fromCurrency
                 toCurrency:(nonnull NSString *)toCurrency;

    Swift

    func getExchangeSettings(_ fromCurrency: String, toCurrency: String) -> ZKExchangeSettings?

    Parameters

    fromCurrency

    currency code

    toCurrency

    currency code

  • Get fee rates for selected crypto currency.

    Declaration

    Objective-C

    - (nullable ZKFeeRates *)getFeeRates:(nonnull NSString *)currency;

    Swift

    func getFeeRates(_ currency: String) -> ZKFeeRates?

    Parameters

    currency

    currency code

  • 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 ZKExchangeRate objects.

    See

    ZKHistoricalExchangeRatesInterval

    Declaration

    Objective-C

    - (void)fetchHistoricalExchangeRates:
        (HistoricalExchangeRatesCompletionBlock _Nonnull)completion;

    Swift

    func fetchHistoricalExchangeRates(_ completion: @escaping HistoricalExchangeRatesCompletionBlock)

    Parameters

    completion

    an interface to receive the result or error