Interface OmniSendingService

All Known Implementing Classes:
OmniKeychainSendingService, OmniRpcClientSendingService

public interface OmniSendingService
A service to gather inputs for, sign, and send a transaction. Typically uses OmniSigningService for signing.
  • Method Details

    • omniSend

      CompletableFuture<org.bitcoinj.base.Sha256Hash> omniSend(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID currency, OmniValue amount) throws IOException
      Find inputs, Sign and Send an Omni Simple Send transaction

      This method is compatible with the Omni Core omni_send JSON-RPC method and if made available from a JSON-RPC server should work equivalently. (The last two, optional arguments are not currently implemented.)

      Parameters:
      fromAddress - Omni address sending funds
      toAddress - Omni address receiving funds
      currency - Currency type
      amount - amount
      Returns:
      A future for the transaction hash
      Throws:
      IOException - A failure occurred fetching inputs or broadcasting the transaction
    • omniSend

      CompletableFuture<org.bitcoinj.base.Sha256Hash> omniSend(UnsignedTxSimpleSend simpleSend) throws IOException
      Sign and Send an Omni Simple Send transaction. Incubating.
      Parameters:
      simpleSend - An object holding all the parameters (including UTXO inputs) for a simple send transaction
      Returns:
      A future for the transaction hash
      Throws:
      IOException - A failure occurred fetching broadcasting the transaction
    • assembleSimpleSend

      default UnsignedTxSimpleSend assembleSimpleSend(org.bitcoinj.base.Address fromAddress, org.bitcoinj.base.Address toAddress, CurrencyID currency, OmniValue amount) throws IOException
      Build a complete, unsigned SimpleSend ("signing request") transaction. Fetches the transaction inputs, assembles the payload, etc.
      Parameters:
      fromAddress - Omni address sending funds
      toAddress - Omni address receiving funds
      currency - Currency type
      amount - amount
      Returns:
      A record containing all necessary data for signing
      Throws:
      IOException - if an error occurred fetching inputs
    • getInputsFor

      List<TransactionInputData> getInputsFor(org.bitcoinj.base.Address fromAddress) throws IOException
      Throws:
      IOException
    • sendRawTransactionAsync

      CompletableFuture<org.bitcoinj.base.Sha256Hash> sendRawTransactionAsync(org.bitcoinj.core.Transaction tx)