Package foundation.omni.rest.omniwallet
Class OmniwalletClient
java.lang.Object
foundation.omni.netapi.omniwallet.OmniwalletAbstractClient
foundation.omni.rest.omniwallet.OmniwalletClient
- All Implemented Interfaces:
ConsensusService
,OmniBalanceService
,RxOmniWalletClient
,ConsensusFetcher
,Closeable
,AutoCloseable
,ChainTipService
Omniwallet REST Java client implemented using
OkHttpClient
.-
Nested Class Summary
Nested classes/interfaces inherited from interface foundation.omni.rpc.ConsensusFetcher
ConsensusFetcher.IndeterminateSnapshotException
-
Field Summary
Fields inherited from class foundation.omni.netapi.omniwallet.OmniwalletAbstractClient
BALANCES_FOR_ADDRESSES_MAX_ADDR, baseURI, cachedPropertyTypes, CONNECT_TIMEOUT_MILLIS, debug, network, omniExplorerApiBase, omniwalletApiBase, omniwalletBase, READ_TIMEOUT_MILLIS, stagingBase, strictMode
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorOmniwalletClient
(URI baseURI, boolean debug) OmniwalletClient
(URI baseURI, boolean debug, boolean strictMode) Constructor with debug and strict-mode optionsOmniwalletClient
(URI baseURI, boolean debug, boolean strictMode, okhttp3.OkHttpClient client) OmniwalletClient
(URI baseURI, boolean debug, boolean strictMode, okhttp3.OkHttpClient client, Executor executor) OmniwalletClient
(URI baseURI, boolean debug, boolean strictMode, org.bitcoinj.base.Network network) OmniwalletClient
(URI baseURI, boolean debug, boolean strictMode, org.bitcoinj.base.Network network, okhttp3.OkHttpClient client, Executor executor) OmniwalletClient constructor with all parameters -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletableFuture
<Map<org.bitcoinj.base.Address, OmniwalletAddressBalance>> balanceMapForAddress
(org.bitcoinj.base.Address address) protected CompletableFuture
<Map<org.bitcoinj.base.Address, OmniwalletAddressBalance>> balanceMapForAddresses
(List<org.bitcoinj.base.Address> addresses) static okhttp3.OkHttpClient
defaultHttpClient
(boolean debug) static okhttp3.OkHttpClient.Builder
protected CompletableFuture
<List<AddressVerifyInfo>> verifyAddresses
(CurrencyID currencyID) Methods inherited from class foundation.omni.netapi.omniwallet.OmniwalletAbstractClient
balanceEntryMapper, balanceMapper, balancesForAddressAsync, balancesForAddressesAsync, chainTipPublisher, close, consensusURI, createSnapshot, currentBlockHeightAsync, divisibleToPropertyType, getActiveChainTip, getConsensusForCurrency, getConsensusForCurrencyAsync, listSmartProperties, lookupPropertyType, mapToSmartPropertyListInfo, start, toOmniDivisibleValue, toOmniDivisibleValue, toOmniIndivisibleValue, toOmniIndivisibleValue, toOmniValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface foundation.omni.rpc.ConsensusFetcher
attemptConsensusSnapshotAsync, completeOrRetryConsensusSnapshot, getConsensusSnapshot, getConsensusSnapshotAsync
Methods inherited from interface foundation.omni.netapi.OmniBalanceService
balancesForAddress, balancesForAddresses
Methods inherited from interface foundation.omni.netapi.omniwallet.RxOmniWalletClient
currentChainTipMaybe, pollChainTipOnce
-
Constructor Details
-
OmniwalletClient
public OmniwalletClient()Default constructor -
OmniwalletClient
-
OmniwalletClient
Constructor with debug and strict-mode options- Parameters:
baseURI
- Base URL of serverdebug
- Enable debugging, logging, etc.strictMode
- Only accept valid amounts from server
-
OmniwalletClient
public OmniwalletClient(URI baseURI, boolean debug, boolean strictMode, okhttp3.OkHttpClient client) -
OmniwalletClient
-
OmniwalletClient
public OmniwalletClient(URI baseURI, boolean debug, boolean strictMode, org.bitcoinj.base.Network network) - Parameters:
baseURI
- Base URL of serverdebug
- Enable debugging, logging, etc.strictMode
- Only accept valid amounts from servernetwork
- Specify active Bitcoin network (used for Address validation)
-
OmniwalletClient
public OmniwalletClient(URI baseURI, boolean debug, boolean strictMode, org.bitcoinj.base.Network network, okhttp3.OkHttpClient client, Executor executor) OmniwalletClient constructor with all parameters- Parameters:
baseURI
- Base URL of serverdebug
- Enable debugging, logging, etc.strictMode
- Only accept valid amounts from servernetwork
- Specify active Bitcoin network (used for Address validation)client
- Custom OkHttp clientexecutor
- Executor
-
-
Method Details
-
defaultHttpClient
public static okhttp3.OkHttpClient defaultHttpClient(boolean debug) -
defaultHttpClientBuilder
public static okhttp3.OkHttpClient.Builder defaultHttpClientBuilder() -
balanceMapForAddress
protected CompletableFuture<Map<org.bitcoinj.base.Address,OmniwalletAddressBalance>> balanceMapForAddress(org.bitcoinj.base.Address address) - Specified by:
balanceMapForAddress
in classOmniwalletAbstractClient
-
balanceMapForAddresses
protected CompletableFuture<Map<org.bitcoinj.base.Address,OmniwalletAddressBalance>> balanceMapForAddresses(List<org.bitcoinj.base.Address> addresses) - Specified by:
balanceMapForAddresses
in classOmniwalletAbstractClient
-
verifyAddresses
- Specified by:
verifyAddresses
in classOmniwalletAbstractClient
-
revisionInfo
- Specified by:
revisionInfo
in classOmniwalletAbstractClient
-
propertiesList
- Specified by:
propertiesList
in classOmniwalletAbstractClient
-