final case class GenTransaction[Nid, +Cid](nodes: Map[Nid, GenNode[Nid, Cid]], roots: ImmArray[Nid]) extends HasTxNodes[Nid, Cid] with CidContainer[GenTransaction[Nid, Cid]] with Product with Serializable

General transaction type

Abstracts over NodeId type and ContractId type ContractId restricts the occurrence of contractIds

nodes

The nodes of this transaction.

roots

References to the root nodes of the transaction. Users of this class may assume that all instances are well-formed, i.e., isWellFormed.isEmpty. For performance reasons, users are not required to call isWellFormed. Therefore, it is forbidden to create ill-formed instances, i.e., instances with !isWellFormed.isEmpty.

Linear Supertypes
Serializable, Product, Equals, CidContainer[GenTransaction[Nid, Cid]], HasTxNodes[Nid, Cid], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GenTransaction
  2. Serializable
  3. Product
  4. Equals
  5. CidContainer
  6. HasTxNodes
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new GenTransaction(nodes: Map[Nid, GenNode[Nid, Cid]], roots: ImmArray[Nid])

    nodes

    The nodes of this transaction.

    roots

    References to the root nodes of the transaction. Users of this class may assume that all instances are well-formed, i.e., isWellFormed.isEmpty. For performance reasons, users are not required to call isWellFormed. Therefore, it is forbidden to create ill-formed instances, i.e., instances with !isWellFormed.isEmpty.

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. final def assertNoCid[B](message: (ContractId) => String)(implicit checker: NoCidChecker[GenTransaction[Nid, Cid], B]): B
    Definition Classes
    CidContainer
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  7. def compareForest[Nid2, Cid2](other: GenTransaction[Nid2, Cid2])(compare: (GenNode[Nothing, Cid], GenNode[Nothing, Cid2]) => Boolean): Boolean

    Compares two Transactions up to renaming of Nids.

    Compares two Transactions up to renaming of Nids. with the specified comparision of nodes Nid is irrelevant to the content of the transaction.

  8. final def consumedContracts[Cid2 >: Cid]: Set[Cid2]

    Returns the IDs of all the consumed contracts.

    Returns the IDs of all the consumed contracts. This includes transient contracts but it does not include contracts consumed in rollback nodes.

    Definition Classes
    HasTxNodes
  9. final def contractKeyInputs(implicit evidence: <:<[HasTxNodes[Nid, Cid], HasTxNodes[_, ContractId]]): Either[KeyInputError, Map[GlobalKey, KeyInput]]

    Return the expected contract key inputs (i.e.

    Return the expected contract key inputs (i.e. the state before the transaction) for this transaction or an error if the transaction contains a duplicate key error or has an inconsistent mapping for a key. For KeyCreate and NegativeKeyLookup (both corresponding to the key not being active) the first required input in execution order wins. So if a create comes first the input will be set to KeyCreate, if a negative lookup by key comes first the input will be set to NegativeKeyLookup.

    Because we do not preserve byKey flags across transaction serialization this method will consider all operations with keys for conflicts rather than just by-key operations.

    Definition Classes
    HasTxNodes
    Annotations
    @throws("If a contract key contains a contract id")
  10. final def contractKeys(implicit evidence: <:<[HasTxNodes[Nid, Cid], HasTxNodes[_, ContractId]]): Set[GlobalKey]

    Return all the contract keys referenced by this transaction.

    Return all the contract keys referenced by this transaction. This includes the keys created, exercised, fetched, or looked up, even those that refer transient contracts or that appear under a rollback node.

    Definition Classes
    HasTxNodes
  11. final def ensureNoCid[B](implicit checker: NoCidChecker[GenTransaction[Nid, Cid], B]): Either[ContractId, B]
    Definition Classes
    CidContainer
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equalForest[Cid2 >: Cid](other: GenTransaction[_, Cid2]): Boolean

    Compares two Transactions up to renaming of Nids.

    Compares two Transactions up to renaming of Nids. You most likely want to use this rather than ==, since the Nid is irrelevant to the content of the transaction.

  14. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  15. final def fold[A](z: A)(f: (A, (Nid, GenNode[Nid, Cid])) => A): A

    Traverses the transaction tree in pre-order traversal (i.e.

    Traverses the transaction tree in pre-order traversal (i.e. exercise nodes are traversed before their children)

    Takes constant stack space. Crashes if the transaction is not well formed (see isWellFormed)

    Definition Classes
    HasTxNodes
  16. final def foldInExecutionOrder[A](z: A)(exerciseBegin: (A, Nid, NodeExercises[Nid, Cid]) => (A, Boolean), rollbackBegin: (A, Nid, NodeRollback[Nid]) => (A, Boolean), leaf: (A, Nid, LeafOnlyActionNode[Cid]) => A, exerciseEnd: (A, Nid, NodeExercises[Nid, Cid]) => A, rollbackEnd: (A, Nid, NodeRollback[Nid]) => A): A
    Definition Classes
    HasTxNodes
  17. def foldValues[Z](z: Z)(f: (Z, Value[Cid]) => Z): Z

    Visit every Val.

  18. final def foldWithPathState[A, B](globalState0: A, pathState0: B)(op: (A, B, Nid, GenNode[Nid, Cid]) => (A, B)): A

    A fold over the transaction that maintains global and path-specific state.

    A fold over the transaction that maintains global and path-specific state. Takes constant stack space. Returns the global state.

    Used to for example compute the roots of per-party projections from the transaction.

    Definition Classes
    HasTxNodes
  19. final def foreach(f: (Nid, GenNode[Nid, Cid]) => Unit): Unit

    This function traverses the transaction tree in pre-order traversal (i.e.

    This function traverses the transaction tree in pre-order traversal (i.e. exercise node are traversed before their children).

    Takes constant stack space. Crashes if the transaction is not well formed (see isWellFormed)

    Definition Classes
    HasTxNodes
  20. final def foreachInExecutionOrder(exerciseBegin: (Nid, NodeExercises[Nid, Cid]) => Boolean, rollbackBegin: (Nid, NodeRollback[Nid]) => Boolean, leaf: (Nid, LeafOnlyActionNode[Cid]) => Unit, exerciseEnd: (Nid, NodeExercises[Nid, Cid]) => Unit, rollbackEnd: (Nid, NodeRollback[Nid]) => Unit): Unit
    Definition Classes
    HasTxNodes
  21. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def guessSubmitter: Either[String, Party]
    Definition Classes
    HasTxNodes
  23. final def inactiveContracts[Cid2 >: Cid]: Set[Cid2]

    Local and global contracts that are inactive at the end of the transaction.

    Local and global contracts that are inactive at the end of the transaction. This includes both contracts that have been arachived and local contracts whose create has been rolled back.

    Definition Classes
    HasTxNodes
  24. lazy val informees: Set[Party]

    The union of the informees of a all the action nodes.

    The union of the informees of a all the action nodes.

    Definition Classes
    HasTxNodes
  25. final def inputContracts[Cid2 >: Cid]: Set[Cid2]

    Returns the IDs of all input contracts that are used by this transaction.

    Returns the IDs of all input contracts that are used by this transaction.

    Definition Classes
    HasTxNodes
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. def isWellFormed: Set[NotWellFormedError[Nid]]

    This function checks the following properties:

    This function checks the following properties:

    * No dangling references -- all node ids mentioned in the forest are in the nodes map; * No orphaned references -- all keys of the node map are mentioned in the forest; * No aliasing -- every node id in the node map is mentioned exactly once, in the roots list or as a child of another node.

  28. final def localContracts[Cid2 >: Cid]: Map[Cid2, (Nid, NodeCreate[Cid2])]
    Definition Classes
    HasTxNodes
  29. def mapNodeId[Nid2](f: (Nid) => Nid2): GenTransaction[Nid2, Cid]

    Note: the provided function must be injective, otherwise the transaction will be corrupted.

  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. val nodes: Map[Nid, GenNode[Nid, Cid]]
    Definition Classes
    GenTransactionHasTxNodes
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. def productElementNames: Iterator[String]
    Definition Classes
    Product
  35. final def reachableNodeIds: Set[Nid]
    Definition Classes
    HasTxNodes
  36. def rootNodes: ImmArray[GenActionNode[Nid, Cid]]
    Definition Classes
    HasTxNodes
    Annotations
    @throws(scala.this.throws.<init>$default$1[IllegalArgumentException])
  37. val roots: ImmArray[Nid]
    Definition Classes
    GenTransactionHasTxNodes
  38. def self: GenTransaction.this.type
    Attributes
    protected
    Definition Classes
    GenTransactionCidContainer
  39. def serializable(f: (Value[Cid]) => ImmArray[String]): ImmArray[String]

    checks that all the values contained are serializable

  40. final def suffixCid[B](f: (Hash) => Bytes)(implicit suffixer: CidSuffixer[GenTransaction[Nid, Cid], B]): Either[String, B]
    Definition Classes
    CidContainer
  41. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  42. final def updatedContractKeys(implicit ev: <:<[HasTxNodes[Nid, Cid], HasTxNodes[_, ContractId]]): Map[GlobalKey, Option[ContractId]]

    The contract keys created or updated as part of the transaction.

    The contract keys created or updated as part of the transaction. This includes updates to transient contracts (by mapping them to None) but it does not include any updates under rollback nodes.

    Definition Classes
    HasTxNodes
  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from CidContainer[GenTransaction[Nid, Cid]]

Inherited from HasTxNodes[Nid, Cid]

Inherited from AnyRef

Inherited from Any

Ungrouped