package engine
- Alphabetic
- Public
- Protected
Type Members
- final case class CreateEvent(contractId: ContractId, templateId: Identifier, contractKey: Option[KeyWithMaintainers], argument: Value, agreementText: String, signatories: Set[Party], observers: Set[Party], witnesses: Set[Party]) extends Event with Product with Serializable
Event for created contracts, follows ledger api event protocol
Event for created contracts, follows ledger api event protocol
- contractId
id for the contract this event notifies
- templateId
identifier of the creating template
- contractKey
key for the contract this event notifies
- argument
argument of the contract creation
- signatories
as defined by the template
- observers
as defined by the template or implicitly as choice controllers
- witnesses
additional witnesses induced by parent exercises
- class Engine extends AnyRef
Allows for evaluating Commands and validating Transactions.
Allows for evaluating Commands and validating Transactions.
This class does not dereference contract ids or package ids on its own. Instead, when an instance of this class needs to dereference a contract id or package id, it returns a ResultNeedContract or ResultNeedPackage to the caller. The caller can then resume the computation by calling
result.resume
. The engine may or may not cache and reuse the provided contract instance or package.The caller must dereference contract and package ids consistently, i.e., if the same engine returns
result1
andresult2
,result1
andresult2
request to dereference the same contract or package id, and the caller invokesresult1.resume(x1)
andresult2.resume(x2)
, thenx1
must equalx2
.The caller may deference ids inconsistently across different engines. Namely, if two different engines return
result1
andresult2
, then the caller may callresult1.resume(x1)
andresult2.resume(x2)
withx1 != x2
, even ifresult1
andresult2
request to dereference the same id.The class requires a pseudo random generator (
nextRandomInt
) to randomize the submission time. This generator does not have to be cryptographically secure.This class is thread safe as long
nextRandomInt
is. - final case class EngineConfig(allowedLanguageVersions: VersionRange[LanguageVersion], packageValidation: Boolean = true, stackTraceMode: Boolean = false, profileDir: Option[Path] = None, contractKeyUniqueness: ContractKeyUniquenessMode = ContractKeyUniquenessMode.On, forbidV0ContractId: Boolean = false, requireSuffixedGlobalContractId: Boolean = false) extends Product with Serializable
The Engine configurations describes the versions of language and transaction the engine is allowed to read and write together with engine debugging feature.
The Engine configurations describes the versions of language and transaction the engine is allowed to read and write together with engine debugging feature.
- allowedLanguageVersions
The range of language versions the engine is allowed to load. The engine will crash if it asked to load a language version that is not included in this range.
- stackTraceMode
The flag enables the runtime support for stack trace.
- profileDir
The optional specifies the directory where to save the output of the Daml scenario profiler. The profiler is disabled if the option is empty.
- class EngineInfo extends AnyRef
- sealed abstract class Error extends AnyRef
- sealed trait Event extends Product with Serializable
- final case class ExerciseEvent(contractId: ContractId, templateId: Identifier, choice: ChoiceName, choiceArgument: Value, actingParties: Set[Party], isConsuming: Boolean, children: ImmArray[NodeId], stakeholders: Set[Party], witnesses: Set[Party], exerciseResult: Option[Value]) extends Event with Product with Serializable
Event for exercises
Event for exercises
- contractId
contract id for the target contract
- templateId
identifier of the exercised contract template
- choice
choice exercised
- choiceArgument
arguments given to the choice
- actingParties
parties acting in the exercise
- isConsuming
marks if this exercise archived the target contract
- children
consequence events. note that they're paired with the NodeId of the transaction that originated the event.
- stakeholders
the stakeholders of the target contract -- must be a subset of witnesses.
- witnesses
additional witnesses induced by parent exercises
- exerciseResult
result of exercise of the choice. Optional since this feature was introduced in transaction version 6.
- abstract class MutableCompiledPackages extends CompiledPackages
Trait that extends CompiledPackages with the ability to add new packages.
- sealed trait Result[+A] extends Product with Serializable
many operations require to look up packages and contracts.
many operations require to look up packages and contracts. we do this by allowing our functions to pause and resume after the contract has been fetched.
- final case class ResultDone[A](result: A) extends Result[A] with Product with Serializable
- final case class ResultError(err: Error) extends Result[Nothing] with Product with Serializable
- final case class ResultNeedContract[A](acoid: ContractId, resume: (Option[VersionedContractInstance]) => Result[A]) extends Result[A] with Product with Serializable
Intermediate result indicating that a ContractInstance is required to complete the computation.
Intermediate result indicating that a ContractInstance is required to complete the computation. To resume the computation, the caller must invoke
resume
with the following argument:Some(contractInstance)
, if the caller can dereferenceacoid
tocontractInstance
None
, if the caller is unable to dereferenceacoid
- final case class ResultNeedKey[A](key: GlobalKeyWithMaintainers, resume: (Option[ContractId]) => Result[A]) extends Result[A] with Product with Serializable
- final case class ResultNeedPackage[A](packageId: PackageId, resume: (Option[Package]) => Result[A]) extends Result[A] with Product with Serializable
Intermediate result indicating that a Package is required to complete the computation.
Intermediate result indicating that a Package is required to complete the computation. To resume the computation, the caller must invoke
resume
with the following argument:Some(package)
, if the caller can dereferencepackageId
topackage
None
, if the caller is unable to dereferencepackageId
- final class ValueEnricher extends AnyRef