Is the D disclosure type specific to submitMulti?

The W disclosure type is not specific to submitMulti. The documentation has a brief summary:

The party sees the contract because they have been divulged the contract, e.g., because they witnessed an exercise that resulted in a fetch of this contract.

With a tiny modification to the example from Can I fetch a contract visible to another party with submitMulti? - #4, we can reproduce the same disclosure: Bob can access the fetch choice directly since the contract is visible to him. Alice is a signatory on TFetch so she will witness the exercise and thereby also witness the fetch of the contract.

module Main where

import Daml.Script

template T
  with
    p : Party
  where
    signatory p

template FetchTpl
  with
    p1 : Party
    p2 : Party
  where
    signatory p1
    observer p2
    nonconsuming choice Fetch : T
      with
        cid : ContractId T
      controller p2
      do fetch cid

test = do
  alice <- allocateParty "Alice"
  bob <- allocateParty "Bob"
  fetchCid <- submit alice $ createCmd (FetchTpl alice bob)
  tCid <- submit bob $ createCmd (T bob)
  submit bob $ exerciseCmd fetchCid (Fetch tCid)
  pure ()
3 Likes