TransactionDSLInterpreter - corda

corda / net.corda.testing.dsl / TransactionDSLInterpreter

# TransactionDSLInterpreter

`@DoNotImplement interface TransactionDSLInterpreter : Verifies, OutputStateLookup`

This interface defines the bare bone functionality that a Transaction DSL interpreter should implement.

Parameters

### Properties

#### ledgerInterpreter | A reference to the enclosing ledger{..}'s interpreter. `abstract val ledgerInterpreter: LedgerDSLInterpreter<TransactionDSLInterpreter>`

### Functions

#### _attachment | Attaches an attachment containing the named contract to the transaction `abstract fun _attachment(contractClassName: ContractClassName): Unit` `abstract fun _attachment(contractClassName: ContractClassName, attachmentId: AttachmentId, signers: List<PublicKey>): Unit` Attaches an attachment containing the named contract to the transaction. `abstract fun _attachment(contractClassName: ContractClassName, attachmentId: AttachmentId, signers: List<PublicKey>, jarManifestAttributes: Map<String, String>): Unit`
#### _tweak | Creates a local scoped copy of the transaction. `abstract fun _tweak(dsl: TransactionDSLInterpreter.() -> EnforceVerifyOrFail): EnforceVerifyOrFail`
#### attachment | Adds an Attachment reference to the transaction. `abstract fun attachment(attachmentId: SecureHash): Unit`
#### command | Adds a command to the transaction. `abstract fun command(signers: List<PublicKey>, commandData: CommandData): Unit`
#### input | Adds an input reference to the transaction. Note that verifies will resolve this reference. `abstract fun input(stateRef: StateRef): Unit`
#### output | Adds an output to the transaction. `abstract fun output(contractClassName: ContractClassName, label: String?, notary: Party, encumbrance: Int?, attachmentConstraint: AttachmentConstraint, contractState: ContractState): Unit`
#### reference | Add a reference input state to the transaction. Note that verifies will resolve this reference. `abstract fun reference(stateRef: StateRef): Unit`
#### timeWindow | Sets the time-window of the transaction. `abstract fun timeWindow(data: TimeWindow): Unit`

### Inheritors

#### TestTransactionDSLInterpreter | This interpreter builds a transaction, and TransactionDSL.verifies that the resolved transaction is correct. Note that transactions corresponding to input states are not verified. Use LedgerDSL.verifies for that. `data class TestTransactionDSLInterpreter : TransactionDSLInterpreter, OutputStateLookup`
#### TransactionDSL | Underlying class for the transaction DSL. Do not instantiate directly, instead use the transaction function. `class TransactionDSL<out T : TransactionDSLInterpreter> : TransactionDSLInterpreter`