-
- All Implemented Interfaces:
-
co.electriccoin.lightwallet.client.util.Disposable
public interface CombinedWalletClient implements Disposable
Client for interacting with lightwalletd.
-
-
Method Summary
Modifier and Type Method Description abstract Flow<Response<GetAddressUtxosReplyUnsafe>>fetchUtxos(List<String> tAddresses, BlockHeightUnsafe startHeight, ServiceMode serviceMode)abstract Flow<Response<CompactBlockUnsafe>>getBlockRange(ClosedRange<BlockHeightUnsafe> heightRange, ServiceMode serviceMode)abstract Flow<Response<RawTransactionUnsafe>>getTAddressTransactions(String tAddress, ClosedRange<BlockHeightUnsafe> blockHeightRange, ServiceMode serviceMode)Gets all the transactions for a given t-address over the given range. abstract Flow<Response<SubtreeRootUnsafe>>getSubtreeRoots(UInt startIndex, ShieldedProtocolEnum shieldedProtocol, UInt maxEntries, ServiceMode serviceMode)Returns a stream of information about roots of subtrees of the note commitment tree for the specified protocol. abstract Flow<Response<RawTransactionUnsafe>>observeMempool(ServiceMode serviceMode)abstract Response<LightWalletEndpointInfoUnsafe>getServerInfo(ServiceMode serviceMode)abstract Response<BlockHeightUnsafe>getLatestBlockHeight(ServiceMode serviceMode)abstract Response<RawTransactionUnsafe>fetchTransaction(ByteArray txId, ServiceMode serviceMode)abstract Response<SendResponseUnsafe>submitTransaction(ByteArray tx, ServiceMode serviceMode)Submit a raw transaction. abstract Response<TreeStateUnsafe>getTreeState(BlockHeightUnsafe height, ServiceMode serviceMode)abstract Response<String>checkSingleUseTransparentAddress(ByteArray accountUuid, ServiceMode serviceMode)abstract Response<String>fetchUtxosByAddress(ByteArray accountUuid, String address, ServiceMode serviceMode)abstract Unitreconnect()Reconnect to the same or a different server. -
-
Method Detail
-
fetchUtxos
abstract Flow<Response<GetAddressUtxosReplyUnsafe>> fetchUtxos(List<String> tAddresses, BlockHeightUnsafe startHeight, ServiceMode serviceMode)
- Parameters:
tAddresses- the array containing the transparent addresses to use.startHeight- the starting height to use.
-
getBlockRange
abstract Flow<Response<CompactBlockUnsafe>> getBlockRange(ClosedRange<BlockHeightUnsafe> heightRange, ServiceMode serviceMode)
- Parameters:
heightRange- the inclusive range to fetch.
-
getTAddressTransactions
abstract Flow<Response<RawTransactionUnsafe>> getTAddressTransactions(String tAddress, ClosedRange<BlockHeightUnsafe> blockHeightRange, ServiceMode serviceMode)
Gets all the transactions for a given t-address over the given range. In practice, this is effectively the same as an RPC call to a node that's running an insight server. The data is indexed and responses are fairly quick.
-
getSubtreeRoots
abstract Flow<Response<SubtreeRootUnsafe>> getSubtreeRoots(UInt startIndex, ShieldedProtocolEnum shieldedProtocol, UInt maxEntries, ServiceMode serviceMode)
Returns a stream of information about roots of subtrees of the note commitment tree for the specified protocol.
- Parameters:
startIndex- Index identifying where to start returning subtree rootsshieldedProtocol- Shielded protocol to return subtree roots for.maxEntries- Maximum number of entries to return, or 0 for all entries
-
observeMempool
abstract Flow<Response<RawTransactionUnsafe>> observeMempool(ServiceMode serviceMode)
-
getServerInfo
abstract Response<LightWalletEndpointInfoUnsafe> getServerInfo(ServiceMode serviceMode)
-
getLatestBlockHeight
abstract Response<BlockHeightUnsafe> getLatestBlockHeight(ServiceMode serviceMode)
-
fetchTransaction
abstract Response<RawTransactionUnsafe> fetchTransaction(ByteArray txId, ServiceMode serviceMode)
-
submitTransaction
abstract Response<SendResponseUnsafe> submitTransaction(ByteArray tx, ServiceMode serviceMode)
Submit a raw transaction.
-
getTreeState
abstract Response<TreeStateUnsafe> getTreeState(BlockHeightUnsafe height, ServiceMode serviceMode)
-
checkSingleUseTransparentAddress
abstract Response<String> checkSingleUseTransparentAddress(ByteArray accountUuid, ServiceMode serviceMode)
-
fetchUtxosByAddress
abstract Response<String> fetchUtxosByAddress(ByteArray accountUuid, String address, ServiceMode serviceMode)
-
-
-
-