txCompleter

open override fun txCompleter(tx: iTransaction, minConfirms: Int, flags: Int, inputAmount: Long?, adjustableOutput: Int?, destinationAddress: PayAddress?, changeAddress: PayAddress?, sigHashTypeOverride: ByteArray?, contractId: ByteArray?)

Modifies a transaction based on the passed allowed operations to move it closer to a fully balanced, fully signed state. This function finds inputs needed to supply funds (token or native) for this transaction, generates change outputs, completes partially-defined output scripts, and signs inputs. All of these functions are enabled/disabled by the "flags"parameter.

Parameters

minConfirms

Only fund with coins that have at least this many confirmations

inputAmount

If non-null, assume existing inputs supply this number of satoshis (do not look up these inputs)

flags

See TxCompletionFlags If change outputs are required, add them. If mint baton passing outputs are possible then add them if equalizeAuthorities=true If useAuthorities = true, pull in authorities if needed (and available) to handle (mint/melt) operations If fund = true, add native crypto inputs to pay for the transaction

adjustableOutput

Pass an output index if the fee should be deducted from this output. Otherwise the fee must be taken from extra input

destinationAddress

Use this address whenever the completer needs to inject an address into a script or create an additional output. This is typically used for wallets in single-address mode.

sigHashTypeOverride

: if non-null all signatures will use this as their sighashtype field

changeAddress

: Send any change, either tokens or native, here. If null, a new address is created from the wallet

contractId

Use this contract id if non-null. Otherwise (default is null) select inputs with no associated contract. Change will be also sent to this contract (if changeAddress is unspecified)

Throws