interface TransactionDSLInterpreter : Verifies, OutputStateLookup
This interface defines the bare bone functionality that a Transaction DSL interpreter should implement.
Parameters
abstract val ledgerInterpreter: LedgerDSLInterpreter<TransactionDSLInterpreter>
A reference to the enclosing ledger{..}'s interpreter. |
abstract fun _attachment(contractClassName: <ERROR CLASS>): Unit abstract fun _attachment(contractClassName: <ERROR CLASS>, attachmentId: <ERROR CLASS>, signers: List<PublicKey>): Unit
Attaches an attachment containing the named contract to the transaction abstract fun _attachment(contractClassName: <ERROR CLASS>, attachmentId: <ERROR CLASS>, signers: List<PublicKey>, jarManifestAttributes: Map<String, String>): Unit
Attaches an attachment containing the named contract to the transaction. |
|
abstract fun _tweak(dsl: TransactionDSLInterpreter.() -> EnforceVerifyOrFail): EnforceVerifyOrFail
Creates a local scoped copy of the transaction. |
|
abstract fun attachment(attachmentId: <ERROR CLASS>): Unit
Adds an Attachment reference to the transaction. |
|
abstract fun command(signers: List<PublicKey>, commandData: <ERROR CLASS>): Unit
Adds a command to the transaction. |
|
abstract fun input(stateRef: <ERROR CLASS>): Unit
Adds an input reference to the transaction. Note that verifies will resolve this reference. |
|
abstract fun output(contractClassName: <ERROR CLASS>, label: String?, notary: <ERROR CLASS>, encumbrance: Int?, attachmentConstraint: <ERROR CLASS>, contractState: <ERROR CLASS>): Unit
Adds an output to the transaction. |
|
abstract fun reference(stateRef: <ERROR CLASS>): Unit
Add a reference input state to the transaction. Note that verifies will resolve this reference. |
|
abstract fun timeWindow(data: <ERROR CLASS>): Unit
Sets the time-window of the transaction. |
open fun fails(): EnforceVerifyOrFail
Asserts that verifies throws, with no condition on the exception message. |
|
open infix fun fails with(msg: String): EnforceVerifyOrFail |
|
open fun failsWith(expectedMessage: String?): EnforceVerifyOrFail
Asserts that verifies() throws. |
|
abstract fun <S> retrieveOutputStateAndRef(clazz: Class<S>, label: String): <ERROR CLASS><S>
Retrieves an output previously defined by TransactionDSLInterpreter.output with a label passed in. |
|
abstract fun verifies(): EnforceVerifyOrFail
Verifies the ledger/transaction, throws if the verification fails. |
data class TestTransactionDSLInterpreter : TransactionDSLInterpreter, OutputStateLookup
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. |
|
class TransactionDSL<out T : TransactionDSLInterpreter> : TransactionDSLInterpreter
Underlying class for the transaction DSL. Do not instantiate directly, instead use the transaction function. |