TransactionDSLInterpreter
Keywords: net.corda.testing.dsl.TransactionDSLInterpreter interface
Date: 2023-09-18

net.corda.testing.dsl

## Interface TransactionDSLInterpreter

- All Superinterfaces:
    OutputStateLookup, Verifies
  All Known Implementing Classes:
    TestTransactionDSLInterpreter, TransactionDSL

      @DoNotImplement
      public TransactionDSLInterpreter
      extends Verifies, OutputStateLookup

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

- - ### Constructor Detail

    - #### TransactionDSLInterpreter

          public TransactionDSLInterpreter()

  - ### Method Detail

    - #### getLedgerInterpreter

          @NotNull
          LedgerDSLInterpreter<net.corda.testing.dsl.TransactionDSLInterpreter> getLedgerInterpreter()

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

    - #### input

          void input(@NotNull
                     StateRef stateRef)

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

      Parameters:
        `stateRef` - The input `class StateRef`.
      See Also:
        `verifies`

    - #### reference

          void reference(@NotNull
                         StateRef stateRef)

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

      Parameters:
        `stateRef` - The input `class StateRef`.
      See Also:
        `verifies`

    - #### output

          void output(@NotNull
                      java.lang.String contractClassName,
                      @Nullable
                      java.lang.String label,
                      @NotNull
                      Party notary,
                      @Nullable
                      java.lang.Integer encumbrance,
                      @NotNull
                      AttachmentConstraint attachmentConstraint,
                      @NotNull
                      ContractState contractState)

      Adds an output to the transaction.

      Parameters:
        `contractClassName` - The class name of the contract that verifies this state.
        `label` - An optional label that may be later used to retrieve the output probably in other transactions.
        `notary` - The associated notary.
        `encumbrance` - The position of the encumbrance state.
        `attachmentConstraint` - The attachment constraint
        `contractState` - The state itself.

    - #### attachment

          void attachment(@NotNull
                          SecureHash attachmentId)

      Adds an `interface Attachment` reference to the transaction.

      Parameters:
        `attachmentId` - The hash of the attachment, possibly returned by `LedgerDSLInterpreter.attachment`.
      See Also:
        `interface Attachment`

    - #### command

          void command(@NotNull
                       java.util.List<? extends java.security.PublicKey> signers,
                       @NotNull
                       CommandData commandData)

      Adds a command to the transaction.

      Parameters:
        `signers` - The signer public keys.
        `commandData` - The contents of the command.

    - #### timeWindow

          void timeWindow(@NotNull
                          TimeWindow data)

      Sets the time-window of the transaction.

      Parameters:
        `data` - the `class TimeWindow` (validation window).

    - #### _tweak

          @NotNull
          EnforceVerifyOrFail _tweak(@NotNull
                                              kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.TransactionDSLInterpreter,? extends net.corda.testing.dsl.EnforceVerifyOrFail> dsl)

      Creates a local scoped copy of the transaction.

      Parameters:
        `dsl` - The transaction DSL to be interpreted using the copy.

    - #### _attachment

          void _attachment(@NotNull
                           java.lang.String contractClassName)

      Attaches an attachment containing the named contract to the transaction

      Parameters:
        `contractClassName` - The contract class to attach

    - #### _attachment

          void _attachment(@NotNull
                           java.lang.String contractClassName,
                           @NotNull
                           SecureHash attachmentId,
                           @NotNull
                           java.util.List<? extends java.security.PublicKey> signers)

      Attaches an attachment containing the named contract to the transaction

      Parameters:
        `contractClassName` - The contract class to attach
        `attachmentId` - The attachment

    - #### _attachment

          void _attachment(@NotNull
                           java.lang.String contractClassName,
                           @NotNull
                           SecureHash attachmentId,
                           @NotNull
                           java.util.List<? extends java.security.PublicKey> signers,
                           @NotNull
                           java.util.Map<java.lang.String,java.lang.String> jarManifestAttributes)

      Attaches an attachment containing the named contract to the transaction.

      Parameters:
        `contractClassName` - The contract class to attach.
        `attachmentId` - The attachment.
        `signers` - The signers.
        `jarManifestAttributes` - The JAR manifest file attributes.