BaseTransaction - corda

corda / net.corda.core.transactions / BaseTransaction

# BaseTransaction

`@DoNotImplement abstract class BaseTransaction : NamedByHash`

An abstract class defining fields shared by all transaction types in the system.

### Constructors

#### <init> | An abstract class defining fields shared by all transaction types in the system. `BaseTransaction()`

### Properties

#### inputs | The inputs of this transaction. Note that in BaseTransaction subclasses the type of this list may change! `abstract val inputs: List<*>`
#### notary | If present, the notary for this transaction. If absent then the transaction is not notarised at all. This is intended for issuance/genesis transactions that don't consume any other states and thus can't double spend anything. `abstract val notary: Party?`
#### outputs | Ordered list of states defined by this transaction, along with the associated notaries. `abstract val outputs: List<TransactionState<ContractState>>`
#### outputStates | Helper property to return a list of ContractState objects, rather than the often less convenient TransactionState `val outputStates: List<ContractState>`
#### references | A list of reusable reference data states which can be referred to by other contracts in this transaction. `abstract val references: List<*>`

### Functions

#### checkBaseInvariants | `open fun checkBaseInvariants(): Unit`
#### filterOutputs | Helper to simplify filtering outputs according to a Predicate. `fun <T : ContractState> filterOutputs(clazz: Class<T>, predicate: Predicate<T>): List<T>``fun <T : ContractState> filterOutputs(predicate: (T) -> Boolean): List<T>`
#### filterOutRefs | Helper to simplify filtering output StateAndRef items according to a Predicate. `fun <T : ContractState> filterOutRefs(clazz: Class<T>, predicate: Predicate<T>): List<StateAndRef<T>>``fun <T : ContractState> filterOutRefs(predicate: (T) -> Boolean): List<StateAndRef<T>>`
#### findOutput | Helper to simplify finding a single output matching a Predicate. `fun <T : ContractState> findOutput(clazz: Class<T>, predicate: Predicate<T>): T` `fun <T : ContractState> findOutput(predicate: (T) -> Boolean): T`
#### findOutRef | Helper to simplify finding a single output StateAndRef matching a Predicate. `fun <T : ContractState> findOutRef(clazz: Class<T>, predicate: Predicate<T>): StateAndRef<T>``fun <T : ContractState> findOutRef(predicate: (T) -> Boolean): StateAndRef<T>`
#### getOutput | Helper to simplify getting an indexed output. `fun getOutput(index: Int): ContractState`
#### outputsOfType | Helper to simplify getting all output states of a particular class, interface, or base class. `fun <T : ContractState> outputsOfType(clazz: Class<T>): List<T>``fun <T : ContractState> outputsOfType(): List<T>`
#### outRef | Returns a StateAndRef for the given output index. `fun <T : ContractState> outRef(index: Int): StateAndRef<T>` Returns a StateAndRef for the requested output state, or throws IllegalArgumentException if not found. `fun <T : ContractState> outRef(state: ContractState): StateAndRef<T>`
#### outRefsOfType | Helper to simplify getting all output StateAndRef items of a particular state class, interface, or base class. `fun <T : ContractState> outRefsOfType(clazz: Class<T>): List<StateAndRef<T>>``fun <T : ContractState> outRefsOfType(): List<StateAndRef<T>>`
#### toString | `open fun toString(): String`

### Inheritors

#### CoreTransaction | A transaction with the minimal amount of information required to compute the unique transaction id, and resolve a FullTransaction. This type of transaction, wrapped in SignedTransaction, gets transferred across the wire and recorded to storage. `abstract class CoreTransaction : BaseTransaction`
#### FullTransaction | A transaction with fully resolved components, such as input states. `abstract class FullTransaction : BaseTransaction`