Packages

object ScenarioLedger extends Serializable

An in-memory representation of a ledger for scenarios

Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScenarioLedger
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class AssertMustFail(actAs: Set[Party], readAs: Set[Party], optLocation: Option[Location], time: Timestamp, txid: TransactionId) extends ScenarioStep with Product with Serializable
  2. final case class Commit(txId: TransactionId, richTransaction: RichTransaction, optLocation: Option[Location]) extends ScenarioStep with Product with Serializable
  3. sealed abstract class CommitError extends Product with Serializable
  4. final case class CommitResult(newLedger: ScenarioLedger, transactionId: TransactionId, richTransaction: RichTransaction) extends Product with Serializable

    Result of committing a transaction is the new ledger, and the enriched transaction.

  5. final case class Disclosure(since: TransactionId, explicit: Boolean) extends Product with Serializable
  6. sealed abstract class Error extends Product with Serializable
  7. final case class ErrorLedgerCrash(reason: String) extends Error with Product with Serializable
  8. final case class LedgerData(activeContracts: Set[ContractId], nodeInfos: LedgerNodeInfos, activeKeys: Map[GlobalKey, ContractId], coidToNodeId: Map[ContractId, EventId]) extends Product with Serializable

    activeContracts

    The contracts that are active in the current state of the ledger.

    nodeInfos

    Node information used to efficiently navigate the transaction graph

  9. final case class LedgerException(err: Error) extends RuntimeException with Product with Serializable

    Errors

  10. final case class LedgerNodeInfo(node: Node, optLocation: Option[Location], transaction: TransactionId, effectiveAt: Timestamp, disclosures: Map[Party, Disclosure], referencedBy: Set[EventId], consumedBy: Option[EventId]) extends Product with Serializable

    Node information that we cache to support the efficient consumption of the data stored in the ledger.

    Node information that we cache to support the efficient consumption of the data stored in the ledger.

    node

    The node itself. Repeated here to avoid having to look it up

    transaction

    The transaction that inserted this node.

    effectiveAt

    The time at which this node is effective. NOTE (SM): we denormalize this for speed, as otherwise we'd have to lookup that information on the transaction every time we need to check for whether a contract is active.

    referencedBy

    All nodes referencing this node, which are either 'NodeExercises' or 'NodeEnsureActive' nodes.

    consumedBy

    The node consuming this node, provided such a node exists. Consumption under a rollback is not included here even for contracts created under a rollback node.

  11. type LedgerNodeInfos = Map[EventId, LedgerNodeInfo]
  12. final case class LookupContractNotActive(coid: ContractId, templateId: Identifier, consumedBy: Option[EventId]) extends LookupResult with Product with Serializable
  13. final case class LookupContractNotEffective(coid: ContractId, templateId: Identifier, effectiveAt: Timestamp) extends LookupResult with Product with Serializable
  14. final case class LookupContractNotFound(coid: ContractId) extends LookupResult with Product with Serializable
  15. final case class LookupContractNotVisible(coid: ContractId, templateId: Identifier, observers: Set[Party], stakeholders: Set[Party]) extends LookupResult with Product with Serializable
  16. final case class LookupOk(coinst: FatContractInstance) extends LookupResult with Product with Serializable
  17. sealed abstract class LookupResult extends Product with Serializable
  18. final case class ParticipantView(actAs: Set[Party], readAs: Set[Party]) extends View with Product with Serializable

    The view of the ledger at the given party.

  19. final case class PassTime(dtMicros: Long) extends ScenarioStep with Product with Serializable
  20. final case class RichTransaction(actAs: Set[Party], readAs: Set[Party], effectiveAt: Timestamp, transactionId: LedgerString, transaction: CommittedTransaction, blindingInfo: BlindingInfo) extends Product with Serializable

    A transaction as it is committed to the ledger.

    A transaction as it is committed to the ledger.

    NOTE (SM): This should correspond quite closely to a core transaction. I'm purposely calling it differently to facilitate the discussion when comparing this code to legacy-code for building core transactions.

    effectiveAt

    The time at which this transaction is effective.

  21. sealed abstract class ScenarioStep extends Product with Serializable

    Scenario step representing the actions executed in a scenario.

  22. final case class SubmissionFailed(actAs: Set[Party], readAs: Set[Party], optLocation: Option[Location], time: Timestamp, txid: TransactionId) extends ScenarioStep with Product with Serializable
  23. final case class TransactionId(index: Int) extends Ordered[TransactionId] with Product with Serializable
  24. class TransactionProcessor extends AnyRef

    Functions for updating the ledger with new transactional information.

  25. final case class UniqueKeyViolation(gk: GlobalKey) extends Product with Serializable
  26. sealed abstract class View extends Product with Serializable

    Views onto the ledger

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. def collectCoids(value: Value): Set[ContractId]

    Collect all contract ids appearing in a value

  7. def collectCoids(value: VersionedValue): Set[ContractId]
  8. def commitTransaction(actAs: Set[Party], readAs: Set[Party], effectiveAt: Timestamp, optLocation: Option[Location], tx: SubmittedTransaction, locationInfo: Map[NodeId, Location], l: ScenarioLedger): Either[CommitError, CommitResult]

    Updates the ledger to reflect that committer committed the transaction tr resulting from running the update-expression at time effectiveAt.

  9. def crash(reason: String): Nothing
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  14. def initialLedger(t0: Timestamp): ScenarioLedger

    The initial ledger

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def throwLedgerError(err: Error): Nothing
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. object CommitError extends Serializable
  26. object LedgerData extends Serializable
  27. case object OperatorView extends View with Product with Serializable

    The view of the ledger at the operator, i.e., the view containing all transaction nodes.

  28. object RichTransaction extends Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped