sealed abstract class Transaction extends NetworkElement
Created by chris on 7/14/15.
- Alphabetic
- By Inheritance
- Transaction
- NetworkElement
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def bytes: ByteVector
The byte representation of the NetworkElement
The byte representation of the NetworkElement
- Definition Classes
- NetworkElement
- abstract def inputs: Vector[TransactionInput]
The inputs for this transaction
- abstract def lockTime: UInt32
The locktime for this transaction
- abstract def outputs: Vector[TransactionOutput]
The outputs for this transaction
- abstract def version: Int32
The version number for this transaction
- abstract def weight: Long
This is used to indicate how 'expensive' the transction is on the blockchain.
This is used to indicate how 'expensive' the transction is on the blockchain. This use to be a simple calculation before segwit (BIP141). Each byte in the transaction counted as 4 'weight' units. Now with segwit, the TransactionWitness is counted as 1 weight unit per byte, while other parts of the transaction (outputs, inputs, locktime etc) count as 4 weight units. As we add more witness versions, this may be subject to change. BIP 141 https://github.com/bitcoin/bitcoin/blob/5961b23898ee7c0af2626c46d5d70e80136578d3/src/consensus/validation.h#L96
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def baseSize: Long
Base transaction size is the size of the transaction serialised with the witness data stripped https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Transaction_size_calculations
- def byteSize: Long
The size of the NetworkElement in bytes.
The size of the NetworkElement in bytes.
- Definition Classes
- NetworkElement
- def bytesLE: ByteVector
The byte representation of the NetworkElement in little endian
The byte representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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 hex: String
The hexadecimal representation of the NetworkElement
The hexadecimal representation of the NetworkElement
- Definition Classes
- NetworkElement
- def hexLE: String
The hexadecimal representation of the NetworkElement in little endian
The hexadecimal representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def isCoinbase: Boolean
Determines if this transaction is a coinbase transaction.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy val toBaseTx: BaseTransaction
- def toString(): String
- Definition Classes
- AnyRef → Any
- lazy val totalOutput: CurrencyUnit
- def totalSize: Long
- def txId: DoubleSha256Digest
The
sha256(sha256(tx))
of this transaction, Note that this is the little endian encoding of the hash, NOT the big endian encoding shown in block explorers.The
sha256(sha256(tx))
of this transaction, Note that this is the little endian encoding of the hash, NOT the big endian encoding shown in block explorers. See this link for more info - def txIdBE: DoubleSha256DigestBE
This is the BIG ENDIAN encoding for the txid.
This is the BIG ENDIAN encoding for the txid. This is commonly used for RPC interfaces and block explorers, this encoding is NOT used at the protocol level For more info see: https://bitcoin.stackexchange.com/questions/2063/why-does-the-bitcoin-protocol-use-the-little-endian-notation
- def updateInput(idx: Int, i: TransactionInput): Transaction
Updates the input at the given index and returns the new transaction with that input updated
- def vsize: Long
The transaction's virtual size https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#Transaction_size_calculations
- 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()