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: <Error class: unknown class>)
abstract fun _attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>, signers: List<PublicKey>)

Attaches an attachment containing the named contract to the transaction

abstract fun _attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>, 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: <Error class: unknown class>)

Adds an Attachment reference to the transaction.

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

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: <Error class: unknown class>)

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

Link copied to clipboard
abstract fun output(contractClassName: <Error class: unknown class>, label: String?, notary: <Error class: unknown class>, encumbrance: Int?, attachmentConstraint: <Error class: unknown class>, contractState: <Error class: unknown class>)

Adds an output to the transaction.

Link copied to clipboard
abstract fun reference(stateRef: <Error class: unknown class>)

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

Link copied to clipboard
abstract fun <S> retrieveOutputStateAndRef(clazz: Class<S>, label: String): <Error class: unknown class><S>

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

Link copied to clipboard
abstract fun timeWindow(data: <Error class: unknown class>)

Sets the time-window of the transaction.

Link copied to clipboard

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