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

net.corda.testing.dsl

## Interface LedgerDSLInterpreter<T extends TransactionDSLInterpreter>

- All Superinterfaces:
    OutputStateLookup, Verifies
  All Known Implementing Classes:
    LedgerDSL, TestLedgerDSLInterpreter

      @DoNotImplement
      public LedgerDSLInterpreter<T extends TransactionDSLInterpreter>
      extends Verifies, OutputStateLookup

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

  TODO (Kotlin 1.1): Use type synonyms to make the type params less unwieldy

- - ### Constructor Detail

    - #### LedgerDSLInterpreter

          public LedgerDSLInterpreter()

  - ### Method Detail

    - #### _transaction

          @NotNull
          WireTransaction _transaction(@Nullable
                                                java.lang.String transactionLabel,
                                                @NotNull
                                                TransactionBuilder transactionBuilder,
                                                @NotNull
                                                kotlin.jvm.functions.Function1<? super T,? extends net.corda.testing.dsl.EnforceVerifyOrFail> dsl)

      Creates and adds a transaction to the ledger.

      Parameters:
        `transactionLabel` - Optional label of the transaction, to be used in diagnostic messages.
        `transactionBuilder` - The base transactionBuilder that will be used to build the transaction.
        `dsl` - The dsl that should be interpreted for building the transaction.
      Returns:
        The final `class WireTransaction` of the built transaction.

    - #### _unverifiedTransaction

          @NotNull
          WireTransaction _unverifiedTransaction(@Nullable
                                                          java.lang.String transactionLabel,
                                                          @NotNull
                                                          TransactionBuilder transactionBuilder,
                                                          @NotNull
                                                          kotlin.jvm.functions.Function1<? super T,kotlin.Unit> dsl)

      Creates and adds a transaction to the ledger that will not be verified by `verifies`.

      Parameters:
        `transactionLabel` - Optional label of the transaction, to be used in diagnostic messages.
        `transactionBuilder` - The base transactionBuilder that will be used to build the transaction.
        `dsl` - The dsl that should be interpreted for building the transaction.
      Returns:
        The final `class WireTransaction` of the built transaction.
      See Also:
        `verifies`

    - #### _tweak

          void _tweak(@NotNull
                      kotlin.jvm.functions.Function1<? super net.corda.testing.dsl.LedgerDSLInterpreter<? extends T>,kotlin.Unit> dsl)

      Creates a local scoped copy of the ledger.

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

    - #### attachment

          @NotNull
          SecureHash attachment(@NotNull
                                         java.io.InputStream attachment)

      Adds an attachment to the ledger.

      Parameters:
        `attachment` - The InputStream defining the contents of the attachment.
      Returns:
        The `class SecureHash` that identifies the attachment, to be used in transactions.