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 -
Sets log level for current logger.
See
ZKLogLevelDeclaration
Objective-C
+ (void)setLogLevel:(nonnull NSString *)logLevel;Swift
class func setLogLevel(_ logLevel: String)Parameters
logLevellog level, e.g. ‘debug’ or ‘info’
-
Sets log handler for all ZumoKit related logs.
See
ZKLogLevelDeclaration
Objective-C
+ (void)onLog:(nullable id<ZKLogListener>)logListener logLevel:(nonnull NSString *)logLevel;Swift
class func onLog(_ logListener: ZKLogListener?, logLevel: String)Parameters
logListenerinterface to listen to changes
logLevellog level, e.g. ‘debug’ or ‘info’
-
-initWithApiKey:apiUrl: transactionServiceUrl: cardServiceUrl: notificationServiceUrl: exchangeServiceUrl: custodyServiceUrl: Initializes ZumoKit SDK. Should only be called once.
Declaration
Objective-C
- (nonnull instancetype)initWithApiKey:(nonnull NSString *)apiKey apiUrl:(nonnull NSString *)apiUrl transactionServiceUrl:(nonnull NSString *)transactionServiceUrl cardServiceUrl:(nonnull NSString *)cardServiceUrl notificationServiceUrl: (nonnull NSString *)notificationServiceUrl exchangeServiceUrl:(nonnull NSString *)exchangeServiceUrl custodyServiceUrl:(nonnull NSString *)custodyServiceUrl;Swift
init(apiKey: String, apiUrl: String, transactionServiceUrl: String, cardServiceUrl: String, notificationServiceUrl: String, exchangeServiceUrl: String, custodyServiceUrl: String)Parameters
apiKeyZumoKit API Key
apiUrlZumoKit API URL
transactionServiceUrlZumoKit Transaction Service URL
cardServiceUrlZumoKit Card Service URL
notificationServiceUrlZumoKit Notification Service URL
exchangeServiceUrlZumoKit Exchange Service URL
custodyServiceUrlZumoKit Custody Service URL
Return Value
ZumoKit instance
-
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.
See
Declaration
Objective-C
- (void)signIn:(nonnull NSString *)userTokenSet completion:(ZKUserCompletionBlock _Nonnull)completion;Swift
func sign(in userTokenSet: String) async throws -> ZKUserParameters
userTokenSetuser token set
completioncompletion block to receive the result or error
-
Signs out current user.
Declaration
Objective-C
- (void)signOut;Swift
func signOut() -
Get currently signed-in user or null.
Return Value
current user or null
-
Get crypto utils.
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
fromCurrencycurrency code
toCurrencycurrency code
-
Get all available exchange rates.
Declaration
Objective-C
- (nonnull ZKExchangeRates)getExchangeRates;Swift
func getExchangeRates() -> [String : [String : ZKExchangeRate]]Return Value
mapping between currency pairs and exchange rates
-
Get transasction fee rate for selected crypto currency.
Declaration
Objective-C
- (nullable ZKTransactionFeeRate *)getTransactionFeeRate: (nonnull NSString *)currency;Swift
func getTransactionFeeRate(_ currency: String) -> ZKTransactionFeeRate?Parameters
currencycurrency code
-
Get all available crypto transaction fee rates.
Declaration
Objective-C
- (nonnull ZKTransactionFeeRates)getTransactionFeeRates;Swift
func getTransactionFeeRates() -> [String : ZKTransactionFeeRate]Return Value
mapping between cryptocurrencies and transaction fee rate
-
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
ZKExchangeRateobjects.See
Declaration
Objective-C
- (void)fetchHistoricalExchangeRates: (ZKHistoricalExchangeRatesCompletionBlock _Nonnull)completion;Swift
func fetchHistoricalExchangeRates() async throws -> [String : [String : [String : [ZKExchangeRate]]]]Parameters
completionan interface to receive the result or error
-
Listen to changes in current user’s sign in state, exchange rates, exchange settings or transaction fee rates.
Declaration
Objective-C
- (void)addChangeListener:(nullable id<ZKChangeListener>)listener;Swift
func add(_ listener: ZKChangeListener?)Parameters
listenerinterface to listen to changes
-
Remove change listener.
Declaration
Objective-C
- (void)removeChangeListener:(nullable id<ZKChangeListener>)listener;Swift
func remove(_ listener: ZKChangeListener?)Parameters
listenerinterface to listen to changes
View on GitHub
ZumoKit Class Reference