Packages

object utils extends Helpful

Annotations
@Summary(s = "Console utilities", flag = console.this.Help.Summary.<init>$default$2) @Group(name = "Utilities")
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. utils
  2. Helpful
  3. AnyRef
  4. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def auto_close(closeable: AutoCloseable)(implicit environment: ConsoleEnvironment): Unit
    Annotations
    @Summary(s = "Register `AutoCloseable` object to be shutdown if Canton is shut down", flag = FeatureFlag.Testing)
  6. def cantonProcessLogger(tracedLogger: TracedLogger = logger): ProcessLogger
    Annotations
    @Summary(s = "A process logger that forwards process logs to the canton logs", flag = console.this.Help.Summary.<init>$default$2)
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def generate_contract_id(cryptoPureApi: CryptoPureApi, rawContract: SerializableRawContractInstance, createdAt: CantonTimestamp, discriminator: LfHash, contractSalt: Salt, metadata: ContractMetadata): V1
    Annotations
    @Summary(s = "Generate authenticated contract id.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """The `utils.generate_contract_id` generates "contract id" of a contract. Starting from protocol version 4,
    |Canton uses the so called authenticated contract ids which depend on the details of the associated contracts.
    |When aspects of a contract such as the parties involved change as part of repair or export/import procedure,
    |the corresponding contract id must be recomputed. This function can be used as a tool to generate an id for
    |an arbitrary contract content"""
    )
  11. def generate_daml_script_participants_conf(file: Option[String] = None, useParticipantAlias: Boolean = true, defaultParticipant: Option[ParticipantReference] = None)(implicit env: ConsoleEnvironment): File
    Annotations
    @Summary(s = "Create a participants config for Daml script", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """The generated config can be passed to `daml script` via the `participant-config` parameter.
    |More information about the file format can be found in the `documentation <https://docs.daml.com/daml-script/index.html#using-daml-script-in-distributed-topologies>`_:
    |It takes three arguments:
    |- file (default to "participant-config.json")
    |- useParticipantAlias (default to true): participant aliases are used instead of UIDs
    |- defaultParticipant (default to None): adds a default participant if provided
    |"""
    )
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  14. def help(methodName: String)(implicit consoleEnvironment: ConsoleEnvironment): Unit
    Definition Classes
    Helpful
    Annotations
    @Summary(s = "Help for specific commands (use help() or help(\"method\") for more information)", flag = console.this.Help.Summary.<init>$default$2) @Topic(t = Seq("Top-level Commands"))
  15. def help()(implicit consoleEnvironment: ConsoleEnvironment): Unit
    Definition Classes
    Helpful
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  20. def object_args[T](obj: T)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): List[String]
    Annotations
    @Summary(s = "Reflective inspection of object arguments, handy to inspect case class objects", flag = console.this.Help.Summary.<init>$default$2) @Description(s = "Return the list field names of the given object. Helpful function when inspecting the return result.")
  21. def read_all_messages_from_file[A <: GeneratedMessage](fileName: String)(implicit companion: GeneratedMessageCompanion[A]): Seq[A]
    Annotations
    @Summary(s = "Reads several Protobuf messages from a file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = "Fails with an exception, if the file can't be read or parsed.")
  22. def read_byte_string_from_file(fileName: String)(implicit env: ConsoleEnvironment): ByteString
    Annotations
    @Summary(s = "Reads a ByteString from a file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = "Fails with an exception, if the file can't be read.")
  23. def read_first_message_from_file[A <: GeneratedMessage](fileName: String)(implicit companion: GeneratedMessageCompanion[A]): A
    Annotations
    @Summary(s = "Reads a single Protobuf message from a file.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = "Fails with an exception, if the file can't be read or parsed.")
  24. def recompute_contract_ids(participant: LocalParticipantReference, acs: Seq[SerializableContract]): (Seq[SerializableContract], Map[LfContractId, LfContractId])
    Annotations
    @Summary(s = "Recompute authenticated contract ids.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """The `utils.recompute_contract_ids` regenerates "contract ids" of multiple contracts after their contents have
    |changed. Starting from protocol version 4, Canton uses the so called authenticated contract ids which depend
    |on the details of the associated contracts. When aspects of a contract such as the parties involved change as
    |part of repair or export/import procedure, the corresponding contract id must be recomputed."""
    )
  25. final def retry_until_true(timeout: NonNegativeDuration, maxWaitPeriod: NonNegativeDuration = 10.seconds)(condition: => Boolean, failure: => String = "Condition never became true within ".+(timeout)): Unit
    Annotations
    @Summary(s = "Wait for a condition to become true", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """Wait `timeout` duration until `condition` becomes true.
    | Retry evaluating `condition` with an exponentially increasing back-off up to `maxWaitPeriod` duration between retries.
    |"""
    )
    @SuppressWarnings()
  26. final def retry_until_true(condition: => Boolean)(implicit env: ConsoleEnvironment): Unit
    Annotations
    @Summary(s = "Wait for a condition to become true, using default timeouts", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """
    |Wait until condition becomes true, with a timeout taken from the parameters.timeouts.console.bounded
    |configuration parameter."""
    )
  27. def synchronize_topology(timeoutO: Option[NonNegativeDuration] = None)(implicit env: ConsoleEnvironment): Unit
    Annotations
    @Summary(s = "Wait until all topology changes have been effected on all accessible nodes", flag = console.this.Help.Summary.<init>$default$2)
  28. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. def type_args[T](implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): List[String]
    Annotations
    @Summary(s = "Reflective inspection of type arguments, handy to inspect case class types", flag = console.this.Help.Summary.<init>$default$2) @Description(s = "Return the list of field names of the given type. Helpful function when creating new objects for requests.")
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  34. def write_to_file(data: ByteString, fileName: String): Unit
    Annotations
    @Summary(s = "Writes a ByteString to a file.", flag = console.this.Help.Summary.<init>$default$2)
  35. def write_to_file(data: GeneratedMessage, fileName: String): Unit
    Annotations
    @Summary(s = "Writes a Protobuf message to a file.", flag = console.this.Help.Summary.<init>$default$2)
  36. def write_to_file(data: Seq[GeneratedMessage], fileName: String): Unit
    Annotations
    @Summary(s = "Writes several Protobuf messages to a file.", flag = console.this.Help.Summary.<init>$default$2)

Deprecated Value Members

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

    (Since version 9)

Inherited from Helpful

Inherited from AnyRef

Inherited from Any

Ungrouped