net.corda.core.transactions / TransactionBuilder / <init>

# <init>

`TransactionBuilder(type: TransactionType = TransactionType.General(), notary: Party? = null, inputs: MutableList<StateRef> = arrayListOf(), attachments: MutableList<SecureHash> = arrayListOf(), outputs: MutableList<TransactionState<ContractState>> = arrayListOf(), commands: MutableList<Command> = arrayListOf(), signers: MutableSet<PublicKeyTree> = mutableSetOf(), timestamp: Timestamp? = null)`

A TransactionBuilder is a transaction class thats mutable (unlike the others which are all immutable). It is intended to be passed around contracts that may edit it by adding new states/commands. Then once the states and commands are right, this class can be used as a holding bucket to gather signatures from multiple parties.

The builder can be customised for specific transaction types, e.g. where additional processing is needed before adding a state/command.

### Parameters

`notary` - Notary used for the transaction. If null, this indicates the transaction DOES NOT have a notary. When this is set to a non-null value, an output state can be added by just passing in a ContractState – a TransactionState with this notary specified will be generated automatically.
`signers` - The set of public keys the transaction needs signatures for. The logic for building the signers set can be customised for every TransactionType. E.g. in the general case it contains the command and notary public keys, but for the TransactionType.NotaryChange transactions it is the set of all input ContractState.participants.