Skip to content
Discussions/App Development/Can I use Daml Repl against Daml Hub?Forum ↗

Can I use Daml Repl against Daml Hub?

App Development8 posts276 views8 likesLast activity Feb 2022
GY
gyorgybalazsiOP
Feb 2022

If yes, how do I start Repl?

BE
Ben_M
Feb 2022

Do you mean, how do you invoke an instance of the Daml Repl?

If so, $ daml repl

If not, do you mean what is the complete string to connect to Daml Hub using Daml Repl?

Which I went to test, and discovered my Daml is broken :man_facepalming:t2:

CO
cocreature
Feb 2022

You can use it via the gRPC API. Take a look at the Daml hub documentation for details wtr to TLS and other parameters. Once you downloaded the letsencrypt root cert (only required on macos and Windows), you can run it with a command like the following:

daml repl --ledger-host yourledgerid.daml.app --ledger-port 443 --tls --access-token-file token.jwt --cacrt isrg-root-x1-cross-signed.pem
GY
gyorgybalazsi
Feb 2022

Thank you! Will try.

GY
gyorgybalazsi
Feb 2022

It works, except that the listKnownParties command throws an exception.

Is it because the party management service is not supported on the gRPC API?

If so, how can I use the Daml Repl to query contracts or submit transactions?

CO
cocreature
Feb 2022

Checking with the team why that endpoint does not work. In the meantime, you can use partyFromTex which isn’t great but given that the REPL is temporary the usual caveat of hardcoding party ids being problematic doesn’t apply quite as strongly.

CO
cocreature
Feb 2022

The endpoint is not supported on Daml Hub at the moment which is documented in https://hub.daml.com/docs/api/#section/Supported-Endpoints. This is expected to change in the future.

GY
gyorgybalazsi
Feb 2022

Thanks!

← Back to Discussions