object utils extends Helpful
- Annotations
- @Summary(s = "Console utilities", flag = console.this.Help.Summary.<init>$default$2) @Group(name = "Utilities")
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- utils
- Helpful
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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)
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def contract_data_to_instance(contractData: ContractData, ledgerTime: Instant)(implicit env: ConsoleEnvironment): SerializableContract
- Annotations
- @Summary(s = "Convert contract data to a contract instance.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """The `utils.contract_data_to_instance` bridges the gap between `participant.ledger_api.acs` commands that
|return various pieces of "contract data" and the `participant.repair.add` command used to add "contract instances"
|as part of repair workflows. Such workflows (for example migrating contracts from other Daml ledgers to Canton
|participants) typically consist of extracting contract data using `participant.ledger_api.acs` commands,
|modifying the contract data, and then converting the `contractData` using this function before finally
|adding the resulting contract instances to Canton participants via `participant.repair.add`.
|Obtain the `contractData` by invoking `.toContractData` on the `WrappedCreatedEvent` returned by the
|corresponding `participant.ledger_api.acs.of_party` or `of_all` call. The `ledgerTime` parameter should be
|chosen to be a time meaningful to the domain on which you plan to subsequently invoke `participant.repair.add`
|on and will be retained alongside the contract instance by the `participant.repair.add` invocation.""")
- def contract_instance_to_data(contract: SerializableContract)(implicit env: ConsoleEnvironment): ContractData
- Annotations
- @Summary(s = "Convert a contract instance to contract data.", flag = console.this.Help.Summary.<init>$default$2) @Description(s = """The `utils.contract_instance_to_data` converts a Canton "contract instance" to "contract data", a format more
|amenable to inspection and modification as part of repair workflows. This function consumes the output of
|the `participant.testing` commands and can thus be employed in workflows geared at verifying the contents of
|contracts for diagnostic purposes and in environments in which the "features.enable-testing-commands"
|configuration can be (at least temporarily) enabled.""")
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def generate_daml_script_participants_conf(file: Option[String] = None, 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>`_:""")
- def generate_navigator_conf(participant: LocalParticipantReference, file: Option[String] = None): File
- Annotations
- @Summary(s = "Create a navigator ui-backend.conf for a participant", flag = console.this.Help.Summary.<init>$default$2)
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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"))
- def help()(implicit consoleEnvironment: ConsoleEnvironment): Unit
- Definition Classes
- Helpful
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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.")
- 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.")
- 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.")
- 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.")
- final def retry_until_true(timeout: TimeoutDuration, maxWaitPeriod: TimeoutDuration = 10.seconds)(condition: => Boolean, failure: => String = s"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()
- 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.""")
- def synchronize_topology(timeoutO: Option[TimeoutDuration] = 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)
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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.")
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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)
- 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)
- 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)