Interface Wallet

  • All Known Implementing Classes:
    Wallet.CppProxy

    public interface Wallet
    User wallet provides methods for transfer and exchange of fiat and cryptocurrency funds. Sending a transaction or making an exchange is a two step process. First a transaction or exchange has to be composed via one of the compose methods, then ComposedTransaction or ComposedExchange can be submitted.

    User wallet instance can be obtained by creating, unlocking or recovering user wallet via User instance.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Wallet.CppProxy  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void composeEthTransaction​(java.lang.String fromAccountId, java.math.BigDecimal gasPrice, int gasLimit, java.lang.String destination, java.math.BigDecimal amount, java.lang.String data, java.lang.Integer nonce, boolean sendMax, ComposeTransactionCallback callback)
      Compose Ethereum transaction.
      void composeTransaction​(java.lang.String fromAccountId, java.lang.String changeAccountId, java.lang.String destination, java.math.BigDecimal amount, java.math.BigDecimal feeRate, boolean sendMax, ComposeTransactionCallback callback)
      Compose BTC or BSV transaction.
    • Method Detail

      • composeTransaction

        void composeTransaction​(java.lang.String fromAccountId,
                                java.lang.String changeAccountId,
                                java.lang.String destination,
                                java.math.BigDecimal amount,
                                java.math.BigDecimal feeRate,
                                boolean sendMax,
                                ComposeTransactionCallback callback)
        Compose BTC or BSV transaction. Refer to Send Transactions guide for usage details.

        On success ComposedTransaction is returned via callback.

        Parameters:
        fromAccountId - Account identifier
        changeAccountId - change Account identifier, which can be the same as fromAccountId
        destination - destination wallet address
        amount - amount in BTC or BSV
        feeRate - fee rate in satoshis/byte
        sendMax - send maximum possible funds to destination
        callback - an interface to receive the result or error
      • composeEthTransaction

        void composeEthTransaction​(java.lang.String fromAccountId,
                                   java.math.BigDecimal gasPrice,
                                   int gasLimit,
                                   java.lang.String destination,
                                   java.math.BigDecimal amount,
                                   java.lang.String data,
                                   java.lang.Integer nonce,
                                   boolean sendMax,
                                   ComposeTransactionCallback callback)
        Compose Ethereum transaction. Refer to Send Transactions guide for usage details.

        On success ComposedTransaction is returned via callback.

        Parameters:
        fromAccountId - Account identifier
        gasPrice - gas price in gwei
        gasLimit - gas limit
        destination - destination wallet address
        amount - amount in ETH
        data - data in string format or null
        nonce - next transaction nonce or null
        sendMax - send maximum possible funds to destination
        callback - an interface to receive the result or error