TransactionDSLInterpreter

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

Parameters

The return type of [verifies]/[failsWith] and the like. It is generic so that we have control over whether we want to enforce users to call these methods (see [EnforceVerifyOrFail]) or not.

Inheritors

Properties

Link copied to clipboard

A reference to the enclosing ledger{..}'s interpreter.

Functions

Link copied to clipboard
abstract fun _attachment(contractClassName: ContractClassName)
abstract fun _attachment(contractClassName: ContractClassName, attachmentId: AttachmentId, signers: List<PublicKey>)

Attaches an attachment containing the named contract to the transaction

abstract fun _attachment(contractClassName: ContractClassName, attachmentId: AttachmentId, signers: List<PublicKey>, jarManifestAttributes: Map<String, String>)

Attaches an attachment containing the named contract to the transaction.

Link copied to clipboard

Creates a local scoped copy of the transaction.

Link copied to clipboard
abstract fun attachment(attachmentId: SecureHash)

Adds an Attachment reference to the transaction.

Link copied to clipboard
abstract fun command(signers: List<PublicKey>, commandData: CommandData)

Adds a command to the transaction.

Link copied to clipboard

Asserts that verifies throws, with no condition on the exception message.

Link copied to clipboard
open infix fun fails with(msg: String): EnforceVerifyOrFail
Link copied to clipboard
open fun failsWith(expectedMessage: String?): EnforceVerifyOrFail

Asserts that verifies() throws.

Link copied to clipboard
abstract fun input(stateRef: StateRef)

Adds an input reference to the transaction. Note that verifies will resolve this reference.

Link copied to clipboard
abstract fun output(contractClassName: ContractClassName, label: String?, notary: Party, encumbrance: Int?, attachmentConstraint: AttachmentConstraint, contractState: ContractState)

Adds an output to the transaction.

Link copied to clipboard
abstract fun reference(stateRef: StateRef)

Add a reference input state to the transaction. Note that verifies will resolve this reference.

Link copied to clipboard
abstract fun <S : ContractState> retrieveOutputStateAndRef(clazz: Class<S>, label: String): StateAndRef<S>

Retrieves an output previously defined by TransactionDSLInterpreter.output with a label passed in.

Link copied to clipboard
abstract fun timeWindow(data: TimeWindow)

Sets the time-window of the transaction.

Link copied to clipboard

Verifies the ledger/transaction, throws if the verification fails.