Class OmniClient

All Implemented Interfaces:
OmniClientRawTxSupport, OmniProxyMethods, AutoCloseable, ChainTipClient, ChainTipService, AsyncSupport, JsonRpcClient<JavaType>, JsonRpcTransport<JavaType>, RxJsonRpcClient
Direct Known Subclasses:
OmniTestClient

public class OmniClient extends RxBitcoinClient implements OmniClientRawTxSupport, OmniProxyMethods
Pure Java Bitcoin and Omni Core JSON-RPC client with camelCase method names.

For example, if the RPC is "omni_getbalance", then the corresponding method name is omniGetBalance(Address, CurrencyID).

See Also:
  • Constructor Details

    • OmniClient

      public OmniClient()
      Construct a client by reading bitcoin.conf (Incubating)
    • OmniClient

      public OmniClient(RpcConfig config)
    • OmniClient

      public OmniClient(org.bitcoinj.base.Network network, URI server, String rpcuser, String rpcpassword)
    • OmniClient

      public OmniClient(SSLContext sslContext, org.bitcoinj.base.Network network, URI server, String rpcuser, String rpcpassword, boolean useZmq)
    • OmniClient

      public OmniClient(org.bitcoinj.base.Network network, URI server, String rpcuser, String rpcpassword, boolean useZmq, boolean isOmniProxy)
    • OmniClient

      public OmniClient(SSLContext sslContext, org.bitcoinj.base.Network network, URI server, String rpcuser, String rpcpassword, boolean useZmq, boolean isOmniProxy)
  • Method Details

    • getOmniNetParams

      public OmniNetworkParameters getOmniNetParams()
    • isOmniServer

      public CompletableFuture<Boolean> isOmniServer()
      Check if server is running Omni Core
      Returns:
      result is true if server is an Omni Core server, false otherwise
    • isOmniProxyServer

      public boolean isOmniProxyServer()
      Description copied from interface: OmniProxyMethods
      Determine if remote server is an OmniProxy server.
      Specified by:
      isOmniProxyServer in interface OmniProxyMethods
      Returns:
      true of client was configured to talk to OmniProxy
    • omniGetInfo

      public Map<String,Object> omniGetInfo() throws JsonRpcException, IOException
      Returns various state information of Omni Core and the Omni Layer protocol.
      Returns:
      An object with state information
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniListProperties

      public List<SmartPropertyListInfo> omniListProperties() throws JsonRpcException, IOException
      Lists all currencies, smart properties and tokens.
      Returns:
      A list with short information
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetProperty

      public OmniPropertyInfo omniGetProperty(CurrencyID currency) throws JsonRpcException, IOException
      Returns information about the specified currency, property, or token.
      Parameters:
      currency - The identifier to look up
      Returns:
      Omni Smart Property Info
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetCrowdsale

      public Map<String,Object> omniGetCrowdsale(CurrencyID currency) throws JsonRpcException, IOException
      Returns information about a crowdsale.
      Parameters:
      currency - The identifier of the crowdsale
      Returns:
      An object with detailed information
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetActiveCrowdsales

      public List<Map<String,Object>> omniGetActiveCrowdsales() throws JsonRpcException, IOException
      Lists currently active crowdsales.
      Returns:
      A list with information about active crowdsales
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetActiveDExSells

      public List<Map<String,Object>> omniGetActiveDExSells() throws JsonRpcException, IOException
      Lists currently active offers on the distributed BTC/OMNI exchange.
      Returns:
      A list with information about the active offers
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetBalance

      public BalanceEntry omniGetBalance(org.bitcoinj.base.Address address, CurrencyID currency) throws JsonRpcException, IOException
      Returns the balance for a given address and property.
      Parameters:
      address - The address to look up
      currency - The identifier of the token to look up
      Returns:
      The available and reserved balance
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetAllBalancesForId

      public SortedMap<org.bitcoinj.base.Address,BalanceEntry> omniGetAllBalancesForId(CurrencyID currency) throws JsonRpcException, IOException
      Returns a sorted map of address-balances for a given identifier.
      Parameters:
      currency - The identifier of the token to look up
      Returns:
      A Sorted Map indexed by addresses to available and reserved balances
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetAllBalancesForIdAsList

      public List<AddressBalanceEntry> omniGetAllBalancesForIdAsList(CurrencyID currency) throws JsonRpcException, IOException
      Returns a list of address-balances for a given identifier.
      Parameters:
      currency - The identifier of the token to look up
      Returns:
      A list of address-balances
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetAllBalancesForAddress

      public SortedMap<CurrencyID,BalanceEntry> omniGetAllBalancesForAddress(org.bitcoinj.base.Address address) throws JsonRpcException, IOException
      Returns a sorted map of all token balances for a given address.
      Parameters:
      address - The address to look up
      Returns:
      A Sorted Map indexed by currency/propertyid to available and reserved balances
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetAllBalancesForAddressAsList

      public List<PropertyBalanceEntry> omniGetAllBalancesForAddressAsList(org.bitcoinj.base.Address address) throws JsonRpcException, IOException
      Returns a list of all token balances for a given address.
      Parameters:
      address - The address to look up
      Returns:
      A List of PropertyBalanceEntry
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetTransaction

      public OmniTransactionInfo omniGetTransaction(org.bitcoinj.base.Sha256Hash txId) throws JsonRpcException, IOException
      Returns information about an Omni Layer transaction.
      Parameters:
      txId - The hash of the transaction to look up
      Returns:
      Information about the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniListTransactions

      public List<OmniTransactionInfo> omniListTransactions() throws JsonRpcException, IOException
      Throws:
      JsonRpcException
      IOException
    • omniListTransactions

      public List<OmniTransactionInfo> omniListTransactions(String addressFilter, int count) throws JsonRpcException, IOException
      Throws:
      JsonRpcException
      IOException
    • omniListTransactions

      public List<OmniTransactionInfo> omniListTransactions(String addressFilter, Integer count, Integer skip, Integer startBlock, Integer endBlock) throws JsonRpcException, IOException
      Return a list of wallet transactions
      Parameters:
      addressFilter - Return transactions matching this address, use "*" to return all transactions.
      count - maximum transaction count to return
      skip - number to skip
      startBlock - starting block
      endBlock - ending block
      Returns:
      a list of transaction info objects
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniListBlockTransactions

      public List<org.bitcoinj.base.Sha256Hash> omniListBlockTransactions(Integer blockIndex) throws JsonRpcException, IOException
      Lists all Omni transactions in a block.
      Parameters:
      blockIndex - The block height or block index
      Returns:
      A list of transaction hashes
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniSendRawTx

      public org.bitcoinj.base.Sha256Hash omniSendRawTx(org.bitcoinj.base.Address fromAddress, String rawTxHex) throws JsonRpcException, IOException
      Broadcasts a raw Omni Layer transaction.
      Specified by:
      omniSendRawTx in interface OmniClientRawTxSupport
      Parameters:
      fromAddress - The address to send from
      rawTxHex - The hex-encoded raw transaction
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniSendRawTx

      public org.bitcoinj.base.Sha256Hash omniSendRawTx(org.bitcoinj.base.Address fromAddress, String rawTxHex, org.bitcoinj.base.Address referenceAddress) throws JsonRpcException, IOException
      Broadcasts a raw Omni Layer transaction with reference address.
      Specified by:
      omniSendRawTx in interface OmniClientRawTxSupport
      Parameters:
      fromAddress - The address to send from
      rawTxHex - The hex-encoded raw transaction
      referenceAddress - The reference address
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniSend

      public org.bitcoinj.base.Sha256Hash omniSend(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID currency, OmniValue amount) throws JsonRpcException, IOException
      Creates and broadcasts a "simple send" transaction.
      Parameters:
      fromAddress - The address to spent from
      toAddress - The address to send to
      currency - The identifier of the token to transfer
      amount - The amount to transfer (Divisible/Indivisible type should match currency ID)
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniSendSTO

      public org.bitcoinj.base.Sha256Hash omniSendSTO(org.bitcoinj.base.Address fromAddress, CurrencyID currency, OmniValue amount) throws JsonRpcException, IOException
      Creates and broadcasts a "send to owners" transaction.
      Parameters:
      fromAddress - The address to spent from
      currency - The identifier of the token to distribute
      amount - The amount to distribute
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniSendAll

      public org.bitcoinj.base.Sha256Hash omniSendAll(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, Ecosystem ecosystem) throws JsonRpcException, IOException
      Creates and broadcasts a "send all" transaction.
      Parameters:
      fromAddress - The address to spent from
      toAddress - The address to send to
      ecosystem - The ecosystem of the tokens to send
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendToMany

      public org.bitcoinj.base.Sha256Hash omniSendToMany(org.bitcoinj.base.Address fromAddress, CurrencyID currency, List<OmniOutput> mapping) throws JsonRpcException, IOException
      Creates and broadcasts a "send to many" transaction.
      Parameters:
      fromAddress - The address to spent from
      currency - The identifier of the token to distribute
      mapping - The receiving addresses and amounts as list of OmniOutput
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.12
    • omniSendDExSell

      public org.bitcoinj.base.Sha256Hash omniSendDExSell(org.bitcoinj.base.Address fromAddress, CurrencyID currencyId, OmniValue amountForSale, org.bitcoinj.base.Coin amountDesired, Byte paymentWindow, org.bitcoinj.base.Coin commitmentFee, Byte action) throws JsonRpcException, IOException
      Creates an offer on the traditional distributed exchange.
      Parameters:
      fromAddress - The address
      currencyId - The identifier of the currency for sale
      amountForSale - The amount of currency (BigDecimal coins)
      amountDesired - The amount of desired Bitcoin (in BTC)
      paymentWindow - The payment window measured in blocks
      commitmentFee - The minimum transaction fee required to be paid as commitment when accepting this offer
      action - The action applied to the offer (1 = new, 2 = update, 3 = cancel)
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendDExAccept

      public org.bitcoinj.base.Sha256Hash omniSendDExAccept(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID currencyId, OmniValue amount, Boolean override) throws JsonRpcException, IOException
      Create and broadcast an accept order for the specified token and amount.
      Parameters:
      fromAddress - The address to send from
      toAddress - The address of the seller
      currencyId - The identifier of the token to purchase
      amount - The amount to accept
      override - Override minimum accept fee and payment window checks (use with caution!)
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendTrade

      public org.bitcoinj.base.Sha256Hash omniSendTrade(org.bitcoinj.base.Address fromAddress, CurrencyID propertyForSale, OmniValue amountForSale, CurrencyID propertyDesired, OmniValue amountDesired) throws JsonRpcException, IOException
      Place a trade offer on the distributed token exchange.
      Parameters:
      fromAddress - The address to trade with
      propertyForSale - The identifier of the tokens to list for sale
      amountForSale - The amount of tokens to list for sale
      propertyDesired - The identifier of the tokens desired in exchange
      amountDesired - The amount of tokens desired in exchange
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendCancelTradesByPrice

      public org.bitcoinj.base.Sha256Hash omniSendCancelTradesByPrice(org.bitcoinj.base.Address fromAddress, CurrencyID propertyForSale, OmniValue amountForSale, CurrencyID propertyDesired, OmniValue amountDesired) throws JsonRpcException, IOException
      Cancel offers on the distributed token exchange with the specified price.
      Parameters:
      fromAddress - The address to trade with
      propertyForSale - The identifier of the tokens to list for sale
      amountForSale - The amount of tokens to list for sale
      propertyDesired - The identifier of the tokens desired in exchange
      amountDesired - The amount of tokens desired in exchange
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendCancelTradesByPair

      public org.bitcoinj.base.Sha256Hash omniSendCancelTradesByPair(org.bitcoinj.base.Address fromAddress, CurrencyID propertyForSale, CurrencyID propertyDesired) throws JsonRpcException, IOException
      Cancel all offers on the distributed token exchange with the given currency pair.
      Parameters:
      fromAddress - The address to trade with
      propertyForSale - The identifier of the tokens listed for sale
      propertyDesired - The identifier of the tokens desired in exchange
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendCancelAllTrades

      public org.bitcoinj.base.Sha256Hash omniSendCancelAllTrades(org.bitcoinj.base.Address fromAddress, Ecosystem ecosystem) throws JsonRpcException, IOException
      Cancel all offers on the distributed token exchange with the given currency pair.
      Parameters:
      fromAddress - The address to trade with
      ecosystem - The ecosystem of the offers to cancel: (1) main, (2) test
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendIssuanceFixed

      public org.bitcoinj.base.Sha256Hash omniSendIssuanceFixed(org.bitcoinj.base.Address fromAddress, Ecosystem ecosystem, PropertyType propertyType, CurrencyID previousId, String category, String subCategory, String name, String url, String data, OmniValue amount) throws JsonRpcException, IOException
      Create new tokens with fixed supply.
      Parameters:
      fromAddress - The address to send from
      ecosystem - The ecosystem to create the tokens in
      propertyType - The type of the tokens to create
      previousId - An identifier of a predecessor token (0 for new tokens)
      category - A category for the new tokens (can be "")
      subCategory - A subcategory for the new tokens (can be "")
      name - The name of the new tokens to create
      url - An URL for further information about the new tokens (can be "")
      data - A description for the new tokens (can be "")
      amount - The number of tokens to create
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendIssuanceCrowdsale

      public org.bitcoinj.base.Sha256Hash omniSendIssuanceCrowdsale(org.bitcoinj.base.Address fromAddress, Ecosystem ecosystem, PropertyType propertyType, CurrencyID previousId, String category, String subCategory, String name, String url, String data, CurrencyID propertyDesired, BigDecimal tokensPerUnit, Long deadline, Byte earlyBirdBonus, Byte issuerBonus) throws JsonRpcException, IOException
      Create new tokens as crowdsale.
      Parameters:
      fromAddress - The address to send from
      ecosystem - The ecosystem to create the tokens in
      propertyType - The type of the tokens to create
      previousId - An identifier of a predecessor token (0 for new tokens)
      category - A category for the new tokens (can be "")
      subCategory - A subcategory for the new tokens (can be "")
      name - The name of the new tokens to create
      url - An URL for further information about the new tokens (can be "")
      data - A description for the new tokens (can be "")
      propertyDesired - the identifier of a token eligible to participate in the crowdsale
      tokensPerUnit - the amount of tokens granted per unit invested in the crowdsale
      deadline - the deadline of the crowdsale as Unix timestamp
      earlyBirdBonus - an early bird bonus for participants in percent per week
      issuerBonus - a percentage of tokens that will be granted to the issuer
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendCloseCrowdsale

      public org.bitcoinj.base.Sha256Hash omniSendCloseCrowdsale(org.bitcoinj.base.Address fromAddress, CurrencyID propertyId) throws JsonRpcException, IOException
      Manually close a crowdsale.
      Parameters:
      fromAddress - The address associated with the crowdsale to close
      propertyId - The identifier of the crowdsale to close
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendIssuanceManaged

      public org.bitcoinj.base.Sha256Hash omniSendIssuanceManaged(org.bitcoinj.base.Address fromAddress, Ecosystem ecosystem, PropertyType propertyType, CurrencyID previousId, String category, String subCategory, String name, String url, String data) throws JsonRpcException, IOException
      Create new tokens with manageable supply.
      Parameters:
      fromAddress - The address to send from
      ecosystem - The ecosystem to create the tokens in
      propertyType - The type of the tokens to create
      previousId - An identifier of a predecessor token (0 for new tokens)
      category - A category for the new tokens (can be "")
      subCategory - A subcategory for the new tokens (can be "")
      name - The name of the new tokens to create
      url - An URL for further information about the new tokens (can be "")
      data - A description for the new tokens (can be "")
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendGrant

      public org.bitcoinj.base.Sha256Hash omniSendGrant(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID propertyId, OmniValue amount) throws JsonRpcException, IOException
      Issue or grant new units of managed tokens.
      Parameters:
      fromAddress - The address to send from
      toAddress - The receiver of the tokens
      propertyId - The identifier of the tokens to grant
      amount - The amount of tokens to create
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendRevoke

      public org.bitcoinj.base.Sha256Hash omniSendRevoke(org.bitcoinj.base.Address fromAddress, CurrencyID propertyId, OmniValue amount) throws JsonRpcException, IOException
      Revoke units of managed tokens.
      Parameters:
      fromAddress - The address to revoke the tokens from
      propertyId - The identifier of the tokens to revoke
      amount - The amount of tokens to revoke
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendChangeIssuer

      public org.bitcoinj.base.Sha256Hash omniSendChangeIssuer(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID propertyId) throws JsonRpcException, IOException
      Change the issuer on record of the given tokens.
      Parameters:
      fromAddress - The address associated with the tokens
      toAddress - The address to transfer administrative control to
      propertyId - The identifier of the tokens
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniSendActivation

      public org.bitcoinj.base.Sha256Hash omniSendActivation(org.bitcoinj.base.Address fromAddress, Short featureId, Integer block, Integer minVersion) throws JsonRpcException, IOException
      Activates a protocol feature.
      Parameters:
      fromAddress - The address to send from
      featureId - The identifier of the feature to activate
      block - The activation block
      minVersion - The minimum supported client version
      Returns:
      The hash of the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniGetSTO

      public Map<String,Object> omniGetSTO(org.bitcoinj.base.Sha256Hash txid) throws JsonRpcException, IOException
      Get information and recipients of a send-to-owners transaction.
      Parameters:
      txid - The hash of the transaction to lookup
      Returns:
      Information about the transaction
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetTrade

      public OmniTradeInfo omniGetTrade(org.bitcoinj.base.Sha256Hash txid) throws JsonRpcException, IOException
      Returns information about an order on the distributed token exchange.
      Parameters:
      txid - The transaction hash of the order to look up
      Returns:
      Information about the order, trade, and order matches
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniGetTradeHistoryForAddress

      public List<OmniTradeInfo> omniGetTradeHistoryForAddress(org.bitcoinj.base.Address address, Integer count, CurrencyID propertyId) throws JsonRpcException, IOException
      Throws:
      JsonRpcException
      IOException
    • omniGetOrderbook

      public List<Map<String,Object>> omniGetOrderbook(CurrencyID propertyForSale) throws JsonRpcException, IOException
      Lists orders on the distributed token exchange with the given token for sale.
      Parameters:
      propertyForSale - The identifier of the token for sale, used as filter
      Returns:
      A list of orders
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniGetOrderbook

      public List<Map<String,Object>> omniGetOrderbook(CurrencyID propertyForSale, CurrencyID propertyDesired) throws JsonRpcException, IOException
      Lists orders on the distributed token exchange with the given token for sale, and token desired.
      Parameters:
      propertyForSale - The identifier of the token for sale, used as filter
      propertyDesired - The identifier of the token desired, used as filter
      Returns:
      A list of orders
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniGetGrants

      public List<Map<String,Object>> omniGetGrants(CurrencyID propertyid) throws JsonRpcException, IOException
      Returns information about granted and revoked units of managed tokens.
      Parameters:
      propertyid - The identifier of the managed tokens to lookup
      Returns:
      A list of grants and revokes
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
    • omniGetActivations

      public Map<String,List<Map<String,Object>>> omniGetActivations() throws JsonRpcException, IOException
      Returns pending and completed feature activations.
      Returns:
      Pending and complete feature activations
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.10
    • omniGetFeeCache

      public List<Map<String,Object>> omniGetFeeCache(CurrencyID propertyid) throws JsonRpcException, IOException
      Obtains the current amount of fees cached (pending distribution). If a property ID is supplied the results will be filtered to show this property ID only. If no property ID is supplied the results will contain all properties that currently have fees cached pending distribution.
      Parameters:
      propertyid - the identifier of the property to filter results on
      Returns:
      A list of amounts of fees cached
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.11
    • omniGetFeeTrigger

      public List<Map<String,Object>> omniGetFeeTrigger(CurrencyID propertyId) throws JsonRpcException, IOException
      Obtains the amount at which cached fees will be distributed. If a property ID is supplied the results will be filtered to show this property ID only. If no property ID is supplied the results will contain all properties.
      Parameters:
      propertyId - the identifier of the property to filter results on
      Returns:
      A list of amounts of fees required to trigger distribution
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.11
    • omniGetFeeShare

      public List<Map<String,Object>> omniGetFeeShare(org.bitcoinj.base.Address address, Ecosystem ecosystem) throws JsonRpcException, IOException
      Obtains the current percentage share of fees addresses would receive if a distribution were to occur. If an address is supplied the results will be filtered to show this address only. If no address is supplied the results will be filtered to show wallet addresses only. If an ecosystem is supplied the results will reflect the fee share for that ecosystem (main or test). If no ecosystem is supplied the results will reflect the main ecosystem.
      Parameters:
      address - the address to filter results on
      ecosystem - the ecosystem to obtain the current percentage fee share
      Returns:
      A list of percentages of fees the address(es) will receive based on the current state
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.11
    • omniGetFeeDistribution

      public Map<String,Object> omniGetFeeDistribution(Integer distributionId) throws JsonRpcException, IOException
      Obtains data for a past distribution of fees. A distribution ID must be supplied to identify the distribution to obtain data for.
      Parameters:
      distributionId - the identifier of the distribution to obtain data for
      Returns:
      Information about a fee distribution
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.11
    • omniGetFeeDistributions

      public List<Map<String,Object>> omniGetFeeDistributions(CurrencyID propertyId) throws JsonRpcException, IOException
      Obtains data for past distributions of fees for a property. A property ID must be supplied to retrieve past distributions for.
      Parameters:
      propertyId - the identifier of the property to retrieve past distributions for
      Returns:
      A list of fee distributions
      Throws:
      JsonRpcException - JSON RPC error
      IOException - network error
      Since:
      Omni Core 0.0.11