object TxUtil extends BitcoinSLogger
- Alphabetic
- By Inheritance
- TxUtil
- BitcoinSLogger
- Logging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addDummySigs(utx: Transaction, inputInfos: Vector[InputInfo])(implicit ec: ExecutionContext): Future[Transaction]
Inserts script signatures and (potentially) witness data to a given transaction using DummyECDigitalSignatures for all sigs in order to produce a transaction roughly the size of the expected fully signed transaction.
Inserts script signatures and (potentially) witness data to a given transaction using DummyECDigitalSignatures for all sigs in order to produce a transaction roughly the size of the expected fully signed transaction. Useful during fee estimation.
Note that the resulting dummy-signed Transaction will have populated (dummy) witness data when applicable.
- def addWitnessData(tx: Transaction, signingInfo: InputSigningInfo[InputInfo]): WitnessTransaction
Adds the signingInfo's scriptWitness from the transaction, if it has one
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildDummyTx(utxos: Vector[InputInfo], outputs: Vector[TransactionOutput])(implicit ec: ExecutionContext): Future[Transaction]
- def calcLockTime(utxos: Seq[InputSigningInfo[InputInfo]]): Try[UInt32]
This helper function calculates the appropriate locktime for a transaction.
This helper function calculates the appropriate locktime for a transaction. To be able to spend CLTVScriptPubKey's you need to have the transaction's locktime set to the same value (or higher) than the output it is spending. See BIP65 for more info
- def calcLockTimeForInfos(utxos: Seq[InputInfo]): Try[UInt32]
This helper function calculates the appropriate locktime for a transaction.
This helper function calculates the appropriate locktime for a transaction. To be able to spend CLTVScriptPubKey's you need to have the transaction's locktime set to the same value (or higher) than the output it is spending. See BIP65 for more info
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def debug(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def debug(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def debug(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def emptyAllScriptSigs(tx: Transaction): Transaction
Sets the ScriptSignature for every input in the given transaction to an EmptyScriptSignature as well as sets the witness to an EmptyWitness
Sets the ScriptSignature for every input in the given transaction to an EmptyScriptSignature as well as sets the witness to an EmptyWitness
- tx
Transaction to empty signatures
- returns
Transaction with no signatures
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def error(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def error(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def info(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def info(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def info(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def inputIndex(inputInfo: InputInfo, tx: Transaction): Int
Returns the index of the InputInfo in the transaction
- def inputIndexOpt(inputInfo: InputInfo, tx: Transaction): Option[Int]
Returns the index of the InputInfo in the transaction
- def isDebugEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isErrorEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isInfoEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRBFEnabled(transaction: Transaction): Boolean
- def isTraceEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def isValidFeeRange(estimatedFee: CurrencyUnit, actualFee: CurrencyUnit, feeRate: FeeUnit): Try[Unit]
Checks if the fee is within a 'valid' range
Checks if the fee is within a 'valid' range
- estimatedFee
the estimated amount of fee we should pay
- actualFee
the actual amount of fee the transaction pays
- feeRate
the fee rate in satoshis/vbyte we paid per byte on this tx
- def isWarnEnabled: Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def logger: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def loggerName: String
- Attributes
- protected
- Definition Classes
- Logging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sanityAmountChecks(isSigned: Boolean, inputInfos: Vector[InputInfo], expectedFeeRate: FeeUnit, tx: Transaction): Try[Unit]
Checks that the creditingAmount >= destinationAmount and then does a sanity check on the transaction's fee
- def sanityChecks(isSigned: Boolean, inputInfos: Vector[InputInfo], expectedFeeRate: FeeUnit, tx: Transaction): Try[Unit]
Runs various sanity checks on a transaction
- def sanityDustCheck(tx: Transaction): Try[Unit]
Checks that no output is beneath the dust threshold
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def trace(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def trace(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def trace(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def warn(mkr: Marker, msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def warn(msg: => Any, t: => Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def warn(msg: => Any): Unit
- Attributes
- protected
- Definition Classes
- Logging