Package foundation.omni.netapi
Interface OmniBalanceService
- All Known Subinterfaces:
ConsensusService
,RxOmniWalletClient
- All Known Implementing Classes:
OmniCoreClient
,OmniCoreConsensusTool
,OmniwalletAbstractClient
,OmniwalletClient
,OmniwalletConsensusTool
,OmniwalletModernJDKClient
public interface OmniBalanceService
Common interface for Omni Core JSON-RPC and Omniwallet for fetching balances for addresses
-
Method Summary
Modifier and TypeMethodDescriptiondefault WalletAddressBalance
balancesForAddress
(org.bitcoinj.base.Address address) Deprecated.balancesForAddressAsync
(org.bitcoinj.base.Address address) Get balances for a single addresses asynchronouslydefault OmniJBalances
balancesForAddresses
(List<org.bitcoinj.base.Address> addresses) Deprecated.balancesForAddressesAsync
(List<org.bitcoinj.base.Address> addresses) Get balances for multiple addresses asynchronouslyReturn current ChainTip
-
Method Details
-
balancesForAddresses
@Deprecated default OmniJBalances balancesForAddresses(List<org.bitcoinj.base.Address> addresses) throws InterruptedException, IOException Deprecated.Get balances for multiple addresses- Parameters:
addresses
- List of addresses to query- Returns:
- A map of maps containing each property balance for each address
- Throws:
InterruptedException
- something went wrongIOException
- an I/O exception or API transport error occurred
-
balancesForAddressesAsync
CompletableFuture<OmniJBalances> balancesForAddressesAsync(List<org.bitcoinj.base.Address> addresses) Get balances for multiple addresses asynchronously- Parameters:
addresses
- List of addresses to query- Returns:
- A future, for a map of maps containing each property balance for each address
-
balancesForAddress
@Deprecated default WalletAddressBalance balancesForAddress(org.bitcoinj.base.Address address) throws InterruptedException, IOException Deprecated.Get balances for a single addresses- Parameters:
address
- Single address to query- Returns:
- a map of currency IDs to balances
- Throws:
InterruptedException
- something went wrongIOException
- an I/O exception or API transport error occurred
-
balancesForAddressAsync
Get balances for a single addresses asynchronously- Parameters:
address
- Single address to query- Returns:
- a future for a map of currency IDs to balances
-
getActiveChainTip
CompletableFuture<ChainTip> getActiveChainTip()Return current ChainTip- Returns:
- "active" ChainTip
-
balancesForAddressAsync(Address)