txCompleter

abstract fun txCompleter(tx: iTransaction, minConfirms: Int, flags: Int, inputAmount: Long? = null, adjustableOutput: Int? = null, destinationAddress: PayAddress? = null)

Modify the passed transaction to complete it to the extent possible by this wallet, including: Find inputs needed to supply satoshis and/or group tokens for this transaction. If change outputs are required, add them. If mint baton passing outputs are possible then add them if equalizeAuthorities=true If outputs are not fully specified, supply the missing constraints.

Parameters

tx

: The transaction to complete

inputAmount

: if inputAmount is non-null, assume existing inputs supply this number of satoshis (do not look up these inputs)

flags

: bit map of TxCompletionFlags that must be set

useAuthorities

: If useAuthorities = true, pull in authorities if needed (and available) to handle (mint/melt) operations

fund

: If fund = true, add native crypto inputs to pay for the transaction

adjustableOutput

: Based on the flags, this output may be adjusted for fee or surplus (coming out of tokens). Pass a null if any adjustment should error.

destinationAddress

: If null, any missing output templates will substitute a new address from the wallet. If non-null output substitutions will use this address.