Help Issue

Running daml-sdk 2.1.1 I connect the canton console to it and I look at participant 0

Then I ask for the help on it:
@ participants.all(0).help
Top-level Commands

config - Return participant config
help - Help for specific commands (use help() or help(“method”) for more information)
id - Yields the globally unique id of this participant. Throws an exception, if the id has not yet been allocated (e.g., the participant has not yet been started).
is_initialized - Check if the local instance is running and is fully initialized
is_running - Check if the local instance is running
start - Start the instance
stop - Stop the instance

Certificates

certs - Manage your certificates

Command Groups

dars - Manage DAR packages
db - Database related operations
domains - Manage domain connections
health - Health and diagnostic related commands
keys - Manage public and secret keys
packages - Manage raw Daml-LF packages
parties - Inspect and manage parties
replication - Manage participant replication
resources - Functionality for managing resources
topology - Topology management related commands

Id Works
@ participants.all(0).id
res2: ParticipantId = PAR::sandbox::122097cb2d68…

But when I call the is_running method on it, it gives me an error:
@ participants.all(0).is_running
cmd8.sc:1: value is_running is not a member of com.digitalasset.canton.console.ParticipantReference
val res8 = participants.all(0).is_running

Should the help indicate that is_running is available?

Then I use the completion:
@ participants.all(0).
InstanceId consoleEnvironment keys pretty productElementNames toLf
Status copy ledger_api prettyInfix productIterator toProtoPrimitive
StringOperators customParam name prettyNode productPrefix topology
adHocPrettyInstance dars packages prettyOfClass pruning transfer
adminParty discard param prettyOfObject resources typeClassInstance
canEqual domains paramIfDefined prettyOfParam self uid
certs filterString paramIfNonEmpty prettyOfString show unnamedParam
clear_cache health paramIfTrue productArity showType unnamedParamIfDefined
code help paramWithoutValue productElement testing unnamedParamIfNonEmpty
config id parties productElementName toLengthLimitedString

But when I call InstanceId I also get an error.
@ participants.all(0).InstanceId
cmd8.sc:1: value InstanceId is not a member of com.digitalasset.canton.console.ParticipantReference
val res8 = participants.all(0).InstanceId

commands such as status, config etc… seem to work ok! Is it due to being the sandbox? Why is there a different help than what the completion shows?

participants.all gives all participants, including both local and remote participants. This means you can only use commands that exist for both local and remote participants.

The command is_running only exists for local participants, so the following will work

@ participants.local(0).is_running
res7: Boolean = true

The InstanceId that you’re seeing is a type rather than being a value. So you could use it like this:

@ type MyType = participant1.InstanceId
defined type MyType
@ ParticipantId("hello").isInstanceOf[MyType]
res12: Boolean = true

Let me know if there are any further questions,
Phoebe

Thanks a lot!
I think then that the help and tab should be consistent with what can be applied contextually!