Template_Restriction
- Sridinesh_ROP 1
Hi all,
In Daml is there any restriction we can made for template so that only the party can access those template. any example on this i can go through to get familiar? - Stephen 1
Do you want to restrict access to templates, or contracts of those templates? For example,
template Iou with sender: Party receiver: Party amount: Int where signatory sender, receiverThe template is just literally what I wrote above, in other words the Daml code that someone wrote to describe contracts; the contract would be specific, signed
creates of this template on a ledger.The privacy of contracts is at the heart of Daml. For example, only the specific
senderandreceivercan see any givenIoucontract.Since anyone who can access the server can download all the templates (i.e. all the Daml code written and stored there), so you can see exactly what you’re agreeing to if you sign a contract of one of those templates, template privacy isn’t really part of the model. However, consider this: if I don’t have the signature of the
senderI want to put in myIoucontract, I cannot create that contract and make myself thereceiver. Contracts cannot be created without the agreement of all signatory parties. If I never receive permission from the relevant sender, what harm can I do by being able to see theIoutemplate as a participating party on this server?