o

com.digitalasset.canton.util

LfTransactionUtil

object LfTransactionUtil

Helper functions to work with com.digitalasset.daml.lf.transaction.GenTransaction. Using these helper functions is useful to provide a buffer from upstream changes.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LfTransactionUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. val actingParties: (LfActionNode) => Set[LfPartyId]

    Yields the the acting parties of the node, if applicable

    Yields the the acting parties of the node, if applicable

    Exceptions thrown

    java.lang.IllegalArgumentException if a Fetch node does not contain the acting parties.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def assertNoContractIdInKey(key: Value): Value

    Exceptions thrown

    java.lang.IllegalArgumentException if key contains a contact ID.

  7. def checkNoContractIdInKey(key: LfVersioned[LfValue]): Either[LfContractId, LfVersioned[LfValue]]
  8. def checkNoContractIdInKey(key: Value): Either[LfContractId, Value]

    Check that the com.daml.lf.value.Value key does not contain a contract ID.

    Check that the com.daml.lf.value.Value key does not contain a contract ID. If the key does contain a contract ID then it will be returned in a Left. Valid contract keys cannot contain contract IDs.

  9. val children: (LfNode) => Seq[LfNodeId]
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  11. def consumedContractId(node: LfActionNode): Option[LfContractId]
  12. def consumedContractIds(transactions: Iterable[LfVersionedTransaction]): Set[LfContractId]

    Given internally consistent transactions, compute their consumed contract ids.

  13. def createdContractIdWithMetadata(node: LfNode): Option[WithContractMetadata[LfContractId]]

    Get the IDs and metadata of all the created contracts of a single com.digitalasset.canton.protocol.package.LfNode.

  14. def duplicatedContractKeys(tx: LfVersionedTransaction): Set[LfGlobalKey]

    Checks that the transaction is consistent w.r.t.

    Checks that the transaction is consistent w.r.t. contract keys, taking into account all nodes instead of only-by key nodes as done by Daml engine when run in mode com.daml.lf.transaction.ContractKeyUniquenessMode.On.

    For example, if a transaction fetches a contract by contract id and creates another contract that has the same contract key as the fetched contract, Daml engine will not complain about duplicate contract keys because the fetch does not have the com.daml.lf.transaction.Node.Action.byKey field set.

    Exceptions thrown

    java.lang.IllegalArgumentException if transaction's keys contain contract Ids.

    See also

    com.daml.lf.speedy.PartialTransaction.keys for Daml engine's tracking of unique keys

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def foldExecutionOrderM[F[_], A](tx: LfTransaction, initial: A)(exerciseBegin: (LfNodeId, LfNodeExercises, A) => F[A])(leaf: (LfNodeId, LfLeafOnlyActionNode, A) => F[A])(exerciseEnd: (LfNodeId, LfNodeExercises, A) => F[A])(rollbackBegin: (LfNodeId, LfNodeRollback, A) => F[A])(rollbackEnd: (LfNodeId, LfNodeRollback, A) => F[A])(implicit F: Monad[F]): F[A]

    Monadic visit to all nodes of the transaction in execution order.

    Monadic visit to all nodes of the transaction in execution order. Exercise nodes are visited twice: when execution reaches them and when execution leaves their body. Crashes on malformed transactions (see com.daml.lf.transaction.GenTransaction.isWellFormed)

    Annotations
    @nowarn()
  18. def fromGlobalKeyWithMaintainers(global: LfGlobalKeyWithMaintainers): LfKeyWithMaintainers
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def globalKeyWithMaintainers(templateId: LfTemplateId, keyWithMaintainers: LfKeyWithMaintainers): Either[LfContractId, LfGlobalKeyWithMaintainers]

    Check that keyWithMaintainers has a key that doesn't contain a contract ID (so can be used as a contact key).

    Check that keyWithMaintainers has a key that doesn't contain a contract ID (so can be used as a contact key). If so, convert keyWithMaintainers to a com.digitalasset.canton.protocol.package.LfGlobalKeyWithMaintainers.

  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def informees(transaction: LfVersionedTransaction): Set[LfPartyId]

    Compute the informees of a transaction based on the ledger model definition.

    Compute the informees of a transaction based on the ledger model definition.

    Refer to https://docs.daml.com/concepts/ledger-model/ledger-privacy.html#projections

  23. def informees(node: LfActionNode): Set[LfPartyId]

    Compute the informees of a node based on the ledger model definition.

    Compute the informees of a node based on the ledger model definition.

    Refer to https://docs.daml.com/concepts/ledger-model/ledger-privacy.html#projections

    Exceptions thrown

    java.lang.IllegalStateException if a Fetch node does not contain the acting parties.

  24. def inputContractIdsWithMetadata(tx: LfVersionedTransaction): Set[WithContractMetadata[LfContractId]]

    Get the IDs and metadata of all input contracts of a com.digitalasset.canton.protocol.package.LfVersionedTransaction.

    Get the IDs and metadata of all input contracts of a com.digitalasset.canton.protocol.package.LfVersionedTransaction. Input contracts are those that are used, but are not transient.

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def keyWithMaintainers(node: LfActionNode): Option[LfKeyWithMaintainers]
  27. def lightWeight(node: LfActionNode): LfActionNode

    Yields the light-weight version (i.e.

    Yields the light-weight version (i.e. without exercise children and result) of this node.

    Exceptions thrown

    java.lang.UnsupportedOperationException if node is a rollback.

  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def nodeHasSeed(node: LfNode): Boolean

    Whether or not a node has a random seed

  30. def nodeTemplate(node: LfActionNode): Identifier
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. implicit val orderTransactionVersion: Order[TransactionVersion]
  34. def referencedContractIds(value: Value): Set[LfContractId]

    All contract IDs referenced with a Daml com.daml.lf.value.Value

  35. val signatoriesOrMaintainers: (LfActionNode) => Set[LfPartyId]

    Yields the signatories of the node's contract, or key maintainers for nodes without signatories.

  36. def stateKnownTo(node: LfActionNode): Set[LfPartyId]
  37. def suffixContractInst(unicumOfDiscriminator: (LfHash) => Option[Unicum])(contractInst: LfContractInst): Either[String, LfContractInst]
  38. def suffixNode(unicumOfDiscriminator: (LfHash) => Option[Unicum])(node: LfActionNode): Either[String, LfActionNode]
  39. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  40. def toString(): String
    Definition Classes
    AnyRef → Any
  41. def tryGlobalKeyWithMaintainers(templateId: LfTemplateId, keyWithMaintainers: LfKeyWithMaintainers, version: LfTransactionVersion): LfVersioned[LfGlobalKeyWithMaintainers]

    Convert keyWithMaintainers to a versioned com.digitalasset.canton.protocol.package.LfGlobalKeyWithMaintainers, throwing an java.lang.IllegalArgumentException if keyWithMaintainers has a key that contains a contract ID.

  42. def usedContractIdWithMetadata(node: LfActionNode): Option[WithContractMetadata[LfContractId]]

    Get the IDs and metadata of contracts used within a single com.digitalasset.canton.protocol.package.LfActionNode

  43. def usedContractIdsWithMetadata(tx: LfVersionedTransaction): Set[WithContractMetadata[LfContractId]]

    Get the IDs and metadata of all the used contracts of a com.digitalasset.canton.protocol.package.LfVersionedTransaction

  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()
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped