TransactionDSL

class TransactionDSL<out T : TransactionDSLInterpreter>(interpreter: T, notary: <Error class: unknown class>) : TransactionDSLInterpreter

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

Constructors

Link copied to clipboard
constructor(interpreter: T, notary: <Error class: unknown class>)

Properties

Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun _attachment(contractClassName: <Error class: unknown class>)
open override 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

open override 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
override fun attachment(contractClassName: <Error class: unknown class>)
fun attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>)
fun attachment(contractClassName: <Error class: unknown class>, attachmentId: <Error class: unknown class>, signers: List<PublicKey>, jarManifestAttributes: Map<String, String> = emptyMap())
Link copied to clipboard
fun attachments(vararg contractClassNames: <Error class: unknown class>): <Error class: unknown class>
Link copied to clipboard
fun command(signer: PublicKey, commandData: <Error class: unknown class>): <Error class: unknown class>
open override fun command(signers: List<PublicKey>, commandData: <Error class: unknown class>)

Adds a command to the transaction.

Link copied to clipboard
open override fun fails(): EnforceVerifyOrFail

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

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

Asserts that verifies() throws.

Link copied to clipboard
override fun input(stateLabel: String): <Error class: unknown class>

Looks up the output label and adds the found state as an input.

fun input(contractClassName: <Error class: unknown class>, state: <Error class: unknown class>)

Creates an LedgerDSLInterpreter._unverifiedTransaction with a single output state and adds its reference as an input to the current transaction.

fun input(contractClassName: <Error class: unknown class>, stateLabel: String)
Link copied to clipboard
fun output(contractClassName: <Error class: unknown class>, contractState: <Error class: unknown class>)
fun output(contractClassName: <Error class: unknown class>, notary: <Error class: unknown class>, contractState: <Error class: unknown class>)
fun output(contractClassName: <Error class: unknown class>, encumbrance: Int, contractState: <Error class: unknown class>)
open override 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.

fun output(contractClassName: <Error class: unknown class>, label: String, contractState: <Error class: unknown class>)
fun output(contractClassName: <Error class: unknown class>, label: String, notary: <Error class: unknown class>, contractState: <Error class: unknown class>)
fun output(contractClassName: <Error class: unknown class>, label: String, encumbrance: Int, contractState: <Error class: unknown class>)

Adds a labelled output to the transaction.

Link copied to clipboard
override fun reference(stateLabel: String): <Error class: unknown class>

Looks up the output label and adds the found state as an reference input state.

fun reference(contractClassName: <Error class: unknown class>, state: <Error class: unknown class>)

Creates an LedgerDSLInterpreter._unverifiedTransaction with a single reference input state and adds its reference as in input to the current transaction.

Link copied to clipboard
open override 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
fun timeWindow(time: Instant, tolerance: Duration = 30.seconds)

Sets the TimeWindow of the transaction.

open override fun timeWindow(data: <Error class: unknown class>)

Sets the time-window of the transaction.

Link copied to clipboard

Creates a local scoped copy of the transaction.

Link copied to clipboard
open override fun verifies(): EnforceVerifyOrFail

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