Questions tagged [daml]

Daml is an open source smart contract language which codifies multi-party agreements. This tag should be used for any questions relating to Daml programming and tools supplied with the Daml SDK.

DAML (the Digital Asset Modeling Language) is a contract modeling language which can run on the Digital Asset Ledger, and codifies multi-party agreements over a distributed ledger. More details on DAML and various use cases are given on the DAML Driven blog.

147 questions
8
votes
1 answer

How to handle RESOURCE EXHAUSTED error in API calls

I’m using the Java Ledger Bindings to get packages from the ledger via the Package service and am getting the following error: RESOURCE_EXHAUSTED: gRPC message exceeds maximum size My application is based on the Ping-Pong example application and the…
dsun
  • 208
  • 3
  • 6
4
votes
1 answer

Is there a way to try to fetch a contract by ID and not fail if the contract is inactive?

With contract keys there are two functions fetchByKey and lookupByKey, the latter of which allows me to handle negative lookups. I don't see a lookup : (Template t) => ContractId t -> Update (Optional t) function that does the same for contract…
bame
  • 960
  • 5
  • 7
4
votes
2 answers

Is there a Hoogle equivalent for DAML?

Hoogle comes handy to find an appropriate function in Haskell by typing the approximate type signature. Is there some similar support for DAML?
therat2000
  • 61
  • 1
4
votes
1 answer

How to extract the name of a Party?

In a DAML contract, how do I extract the name of a party from a Party field? Currently, toText p gives me Party(Alice). I'd like to only keep the name of the party.
Leonel
  • 28,541
  • 26
  • 76
  • 103
3
votes
1 answer

How is Daml able to maintain privacy between the parties if they share the same ledger or from 1.18.0 version postgreSQL?

How is Daml able to maintain privacy between the parties if they share the same ledger or from the 1.18.0 version of PostgreSQL? Will, that data be visible to all the parties if they are able to access to ledger or PostgreSQL DB?
Shalabh Negi
  • 621
  • 7
  • 18
3
votes
2 answers

How do I extract the components of a tuple in DAML?

Given a pair in DAML, e.g. constructed by (1, "test"), how can I get the first and second components out?
bame
  • 960
  • 5
  • 7
3
votes
2 answers

How do I convert DAML tuples received via the DA Ledger API into Java pairs?

I have written a DAML model that generates a list of tuples, e.g. [(Int, Text)]. I receive this data via the DA Ledger API - how do I convert it to List> in Java?
Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
2
votes
1 answer

DAML Language Server failed to run java

I'm trying to setup Visual Studio Code for DAML development on an M1 Mac Mini. I've installed the DAML SDK and installed the VS Code plug-in, but I'm getting this error: damlc: ScenarioServiceException "Failed to run java: fd:23: hGetContents:…
cjmcqueen
  • 191
  • 1
  • 8
2
votes
1 answer

How to extend default Party interface in DAML?

I am new to DAML. I am experimenting DAML for lifecycle management for financial instruments use case. One question comes to my mind is how do we extend the default Party interface? Currently I see that a Party can only have a name and id. A…
Eric Zhu
  • 23
  • 3
2
votes
1 answer

Running daml script on `daml start`

I have a daml file with just one script module User where import Daml.Script makeAdmin = script do admin <- allocateParty "Admin" submit admin do createCmd User with username = admin template User with username: Party where …
pgp1
  • 103
  • 1
  • 13
2
votes
1 answer

How can I order messages in the create-daml-app project in reverse chronological order?

I have been working on adding a few small UI features to the create-daml-app project (https://github.com/digital-asset/daml/tree/ba27ea9af4f39a9a3f307384e05f4bf540101f03/templates/create-daml-app). Specifically, I have added the direct messaging…
Quantifier
  • 135
  • 1
  • 8
2
votes
1 answer

When running the DAML sandbox an error occurs

The following error occurs when running the sandbox: io.grpc.netty.NettyServerHandler onStreamError WARNING: Stream Error io.netty.handler.codec.http2.Http2Exception$HeaderListSizeException: Header size exceeded max allowed size (8192) What could…
arjun a
  • 151
  • 7
2
votes
1 answer

How to query Map values from the Daml through JSonApi?

I have tried to query Daml template text-Map it throwing me empty set instead of giving that particular data- for Example: "Data": [ { "information":"XYZ", { "textMap": { "Type": { …
arjun a
  • 151
  • 7
2
votes
1 answer

Adding a button to Navigator to exercise a choice

Navigator contains a feature where users can define their own table views, see DAML docs for Navigator. Is it possible to create a view where one column renders a button that, when clicked, immediately exercises a choice?
2
votes
1 answer

In DAML scenarios, how do I reuse getParty?

I'm writing multiple scenarios, with a similar setup: test0 = scenario do bank <- getParty "Bank" alice <- getParty "Alice" -- .... assert True test1 = scenario do bank <- getParty "Bank" alice <- getParty "Alice" -- ... assert…
1
2 3
9 10