Package money.zumo.zumokit
Class ZumoCore.CppProxy
- java.lang.Object
-
- money.zumo.zumokit.ZumoCore.CppProxy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface money.zumo.zumokit.ZumoCore
ZumoCore.CppProxy
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void_djinni_private_destroy()voidaddChangeListener(ChangeListener listener)Listen to changes in current user’s sign in state, exchange settings and transaction fee rates.voidfetchHistoricalExchangeRates(HistoricalExchangeRatesCallback callback)Fetch historical exchange rates for supported time intervals.UsergetCurrentUser()Get currently signed-in user or null.ExchangeRategetExchangeRate(java.lang.String fromCurrency, java.lang.String toCurrency)Get exchange rate for selected currency pair.java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,ExchangeRate>>getExchangeRates()Get all available exchange rates.TransactionFeeRategetTransactionFeeRate(java.lang.String currency)Get transaction fee rates for selected crypto currency.java.util.HashMap<java.lang.String,TransactionFeeRate>getTransactionFeeRates()Get all available crypto transaction fee rates.UtilsgetUtils()Get crypto utils class.static java.lang.StringgetVersion()Get ZumoKit SDK version.static ZumoCoreinit(HttpProvider httpProvider, WebSocketFactory webSocketFactory, java.lang.String apiKey, java.lang.String apiUrl, java.lang.String transactionServiceUrl, java.lang.String cardServiceUrl, java.lang.String notificationServiceUrl, java.lang.String exchangeServiceUrl, java.lang.String custodyServiceUrl)Initializes ZumoKit SDK.static voidonLog(LogListener logListener, java.lang.String logLevel)Sets log handler for all ZumoKit related logs.voidremoveChangeListener(ChangeListener listener)Remove change listener.static voidsetLogLevel(java.lang.String logLevel)Sets log level for current logger.voidsignIn(java.lang.String userTokenSet, UserCallback callback)Signs in user corresponding to user token set.voidsignOut()Signs out current user.
-
-
-
Method Detail
-
_djinni_private_destroy
public void _djinni_private_destroy()
-
signIn
public void signIn(java.lang.String userTokenSet, UserCallback callback)Description copied from interface:ZumoCoreSigns 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.
-
signOut
public void signOut()
Description copied from interface:ZumoCoreSigns out current user.
-
getCurrentUser
public User getCurrentUser()
Description copied from interface:ZumoCoreGet currently signed-in user or null.- Specified by:
getCurrentUserin interfaceZumoCore- Returns:
- current user or null
-
getUtils
public Utils getUtils()
Description copied from interface:ZumoCoreGet crypto utils class.
-
getExchangeRate
public ExchangeRate getExchangeRate(java.lang.String fromCurrency, java.lang.String toCurrency)
Description copied from interface:ZumoCoreGet exchange rate for selected currency pair.- Specified by:
getExchangeRatein interfaceZumoCore- Parameters:
fromCurrency- currency codetoCurrency- currency code- Returns:
- exchange rate or null
-
getExchangeRates
public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,ExchangeRate>> getExchangeRates()
Description copied from interface:ZumoCoreGet all available exchange rates.- Specified by:
getExchangeRatesin interfaceZumoCore- Returns:
- mapping between currency pairs and exchange rates
-
getTransactionFeeRate
public TransactionFeeRate getTransactionFeeRate(java.lang.String currency)
Description copied from interface:ZumoCoreGet transaction fee rates for selected crypto currency.- Specified by:
getTransactionFeeRatein interfaceZumoCore- Parameters:
currency- currency code- Returns:
- transaction fee rate or null
-
getTransactionFeeRates
public java.util.HashMap<java.lang.String,TransactionFeeRate> getTransactionFeeRates()
Description copied from interface:ZumoCoreGet all available crypto transaction fee rates.- Specified by:
getTransactionFeeRatesin interfaceZumoCore- Returns:
- mapping between cryptocurrencies and transaction fee rate
-
fetchHistoricalExchangeRates
public void fetchHistoricalExchangeRates(HistoricalExchangeRatesCallback callback)
Description copied from interface:ZumoCoreFetch 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 andExchangeRateobjects.- Specified by:
fetchHistoricalExchangeRatesin interfaceZumoCore- Parameters:
callback- an interface to receive the result or error- See Also:
TimeInterval
-
addChangeListener
public void addChangeListener(ChangeListener listener)
Description copied from interface:ZumoCoreListen to changes in current user’s sign in state, exchange settings and transaction fee rates.- Specified by:
addChangeListenerin interfaceZumoCore- Parameters:
listener- interface to listen to changes
-
removeChangeListener
public void removeChangeListener(ChangeListener listener)
Description copied from interface:ZumoCoreRemove change listener.- Specified by:
removeChangeListenerin interfaceZumoCore- Parameters:
listener- interface to listen to changes
-
getVersion
public static java.lang.String getVersion()
Description copied from interface:ZumoCoreGet ZumoKit SDK version.- Returns:
- semantic version tag if exists, commit hash otherwise
-
setLogLevel
public static void setLogLevel(java.lang.String logLevel)
Description copied from interface:ZumoCoreSets log level for current logger.- Parameters:
logLevel- log level, 'trace', 'debug', 'info', 'warning', 'error', 'critical' or 'off'
-
onLog
public static void onLog(LogListener logListener, java.lang.String logLevel)
Description copied from interface:ZumoCoreSets log handler for all ZumoKit related logs.- Parameters:
logListener- interface to listen to changeslogLevel- log level, 'trace', 'debug', 'info', 'warning', 'error', 'critical' or 'off'
-
init
public static ZumoCore init(HttpProvider httpProvider, WebSocketFactory webSocketFactory, java.lang.String apiKey, java.lang.String apiUrl, java.lang.String transactionServiceUrl, java.lang.String cardServiceUrl, java.lang.String notificationServiceUrl, java.lang.String exchangeServiceUrl, java.lang.String custodyServiceUrl)
Description copied from interface:ZumoCoreInitializes ZumoKit SDK. Should only be called once.- Parameters:
httpProvider- HTTP providerwebSocketFactory- WebSocket factoryapiKey- ZumoKit API KeyapiUrl- ZumoKit API URLtransactionServiceUrl- ZumoKit Transaction Service URLcardServiceUrl- ZumoKit Card Service URLnotificationServiceUrl- ZumoKit Notification Service URLexchangeServiceUrl- ZumoKit Exchange Service URLcustodyServiceUrl- ZumoKit Custody Service URL- Returns:
- ZumoKit instance
-
-