TransactionDSL - corda

corda / net.corda.testing.dsl / TransactionDSL

# TransactionDSL

`class TransactionDSL<out T : TransactionDSLInterpreter> : TransactionDSLInterpreter`

Underlying class for the transaction DSL. Do not instantiate directly, instead use the transaction function.

### Constructors

#### <init> | Underlying class for the transaction DSL. Do not instantiate directly, instead use the transaction function. `TransactionDSL(interpreter: T, notary: Party)`

### Functions

#### attachment | `fun attachment(contractClassName: ContractClassName): Unit` `fun attachment(contractClassName: ContractClassName, attachmentId: AttachmentId, signers: List<PublicKey>, jarManifestAttributes: Map<String, String> = emptyMap()): Unit` `fun attachment(contractClassName: ContractClassName, attachmentId: AttachmentId): Unit`
#### attachments | `fun attachments(vararg contractClassNames: ContractClassName): Unit`
#### command | Adds a command to the transaction. `fun command(signer: PublicKey, commandData: CommandData): Unit`
#### input | Looks up the output label and adds the found state as an input. `fun input(stateLabel: String): Unit` `fun input(contractClassName: ContractClassName, stateLabel: String): Unit` Creates an LedgerDSLInterpreter._unverifiedTransaction with a single output state and adds its reference as an input to the current transaction. `fun input(contractClassName: ContractClassName, state: ContractState): Unit`
#### output | Adds a labelled output to the transaction. `fun output(contractClassName: ContractClassName, label: String, notary: Party, contractState: ContractState): Unit` `fun output(contractClassName: ContractClassName, label: String, encumbrance: Int, contractState: ContractState): Unit` `fun output(contractClassName: ContractClassName, label: String, contractState: ContractState): Unit` Adds an output to the transaction. `fun output(contractClassName: ContractClassName, notary: Party, contractState: ContractState): Unit` `fun output(contractClassName: ContractClassName, encumbrance: Int, contractState: ContractState): Unit` `fun output(contractClassName: ContractClassName, contractState: ContractState): Unit`
#### reference | Looks up the output label and adds the found state as an reference input state. `fun reference(stateLabel: String): Unit` Creates an LedgerDSLInterpreter._unverifiedTransaction with a single reference input state and adds its reference as in input to the current transaction. `fun reference(contractClassName: ContractClassName, state: ContractState): Unit`
#### timeWindow | Sets the TimeWindow of the transaction. `fun timeWindow(time: Instant, tolerance: Duration = 30.seconds): Unit`
#### tweak | Creates a local scoped copy of the transaction. `fun tweak(dsl: TransactionDSL<TransactionDSLInterpreter>.() -> EnforceVerifyOrFail): EnforceVerifyOrFail`