Class ZumoCore.CppProxy

  • All Implemented Interfaces:
    ZumoCore
    Enclosing interface:
    ZumoCore

    public static final class ZumoCore.CppProxy
    extends java.lang.Object
    implements ZumoCore
    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • signIn

        public void signIn​(java.lang.String userTokenSet,
                           UserCallback callback)
        Description copied from interface: ZumoCore
        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.
        Specified by:
        signIn in interface ZumoCore
        Parameters:
        userTokenSet - user token set
        callback - an interface to receive the result or error
        See Also:
        User
      • signOut

        public void signOut()
        Description copied from interface: ZumoCore
        Signs out current user.
        Specified by:
        signOut in interface ZumoCore
      • getCurrentUser

        public User getCurrentUser()
        Description copied from interface: ZumoCore
        Get currently signed-in user or null.
        Specified by:
        getCurrentUser in interface ZumoCore
        Returns:
        current user or null
      • getUtils

        public Utils getUtils()
        Description copied from interface: ZumoCore
        Get crypto utils class.
        Specified by:
        getUtils in interface ZumoCore
        Returns:
        crypto utils
      • getExchangeRate

        public ExchangeRate getExchangeRate​(java.lang.String fromCurrency,
                                            java.lang.String toCurrency)
        Description copied from interface: ZumoCore
        Get exchange rate for selected currency pair.
        Specified by:
        getExchangeRate in interface ZumoCore
        Parameters:
        fromCurrency - currency code
        toCurrency - 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: ZumoCore
        Get all available exchange rates.
        Specified by:
        getExchangeRates in interface ZumoCore
        Returns:
        mapping between currency pairs and exchange rates
      • getTransactionFeeRate

        public TransactionFeeRate getTransactionFeeRate​(java.lang.String currency)
        Description copied from interface: ZumoCore
        Get transaction fee rates for selected crypto currency.
        Specified by:
        getTransactionFeeRate in interface ZumoCore
        Parameters:
        currency - currency code
        Returns:
        transaction fee rate or null
      • getTransactionFeeRates

        public java.util.HashMap<java.lang.String,​TransactionFeeRate> getTransactionFeeRates()
        Description copied from interface: ZumoCore
        Get all available crypto transaction fee rates.
        Specified by:
        getTransactionFeeRates in interface ZumoCore
        Returns:
        mapping between cryptocurrencies and transaction fee rate
      • fetchHistoricalExchangeRates

        public void fetchHistoricalExchangeRates​(HistoricalExchangeRatesCallback callback)
        Description copied from interface: ZumoCore
        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 ExchangeRate objects.
        Specified by:
        fetchHistoricalExchangeRates in interface ZumoCore
        Parameters:
        callback - an interface to receive the result or error
        See Also:
        TimeInterval
      • addChangeListener

        public void addChangeListener​(ChangeListener listener)
        Description copied from interface: ZumoCore
        Listen to changes in current user’s sign in state, exchange settings and transaction fee rates.
        Specified by:
        addChangeListener in interface ZumoCore
        Parameters:
        listener - interface to listen to changes
      • removeChangeListener

        public void removeChangeListener​(ChangeListener listener)
        Description copied from interface: ZumoCore
        Remove change listener.
        Specified by:
        removeChangeListener in interface ZumoCore
        Parameters:
        listener - interface to listen to changes
      • getVersion

        public static java.lang.String getVersion()
        Description copied from interface: ZumoCore
        Get 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: ZumoCore
        Sets 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: ZumoCore
        Sets log handler for all ZumoKit related logs.
        Parameters:
        logListener - interface to listen to changes
        logLevel - 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: ZumoCore
        Initializes ZumoKit SDK. Should only be called once.
        Parameters:
        httpProvider - HTTP provider
        webSocketFactory - WebSocket factory
        apiKey - ZumoKit API Key
        apiUrl - ZumoKit API URL
        transactionServiceUrl - ZumoKit Transaction Service URL
        cardServiceUrl - ZumoKit Card Service URL
        notificationServiceUrl - ZumoKit Notification Service URL
        exchangeServiceUrl - ZumoKit Exchange Service URL
        custodyServiceUrl - ZumoKit Custody Service URL
        Returns:
        ZumoKit instance