Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions sdk/daml-script/daml/Daml/Script/Internal.daml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ module Daml.Script.Internal
, unvetPackages
, unvetPackagesOnParticipant

, -- Party Management
allocateReplicatedPartyOn
, allocateReplicatedPartyWithHintOn

-- Exceptions
, throwAnyException

Expand Down
16 changes: 2 additions & 14 deletions sdk/daml-script/daml/Daml/Script/Internal/Questions/Packages.daml
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,21 @@ instance Show PackageName where

-- | MOVE Daml.Script.Internal
-- Vet a set of packages on all participants.
-- Note that the Admin API port must be provided when using this with a Canton Ledger
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are no longer relevant - so removed

-- Use ``--admin-port`` with the `daml script` CLI tool.
vetPackages : HasCallStack => [PackageName] -> Script ()
vetPackages packages = vetPackagesInternal packages None

-- | MOVE Daml.Script.Internal
-- Vet a set of packages on a single participant.
-- Note that the Admin API port must be provided when using this with a Canton Ledger
-- Use ``--admin-port`` with the `daml script` CLI tool.
vetPackagesOnParticipant : HasCallStack => [PackageName] -> ParticipantName -> Script ()
vetPackagesOnParticipant packages participant = vetPackagesInternal packages (Some participant)

-- | MOVE Daml.Script.Internal
-- Unvet a set of packages on all participants.
-- Note that the Admin API port must be provided when using this with a Canton Ledger
-- Use ``--admin-port`` with the `daml script` CLI tool.
unvetPackages : HasCallStack => [PackageName] -> Script ()
unvetPackages packages = unvetPackagesInternal packages None

-- | MOVE Daml.Script.Internal
-- Unvet a set of packages on a single participant.
-- Note that the Admin API port must be provided when using this with a Canton Ledger
-- Use ``--admin-port`` with the `daml script` CLI tool.
unvetPackagesOnParticipant : HasCallStack => [PackageName] -> ParticipantName -> Script ()
unvetPackagesOnParticipant packages participant = unvetPackagesInternal packages (Some participant)

Expand All @@ -82,15 +74,11 @@ unvetPackagesInternal : HasCallStack => [PackageName] -> Optional ParticipantNam
unvetPackagesInternal packages mParticipantName = lift $ UnvetPackages packages (participantName <$> mParticipantName)

-- | MOVE Daml.Script.Internal
-- Lists the vetted packages on the default participant
-- Note that the Admin API port must be provided when using this with a Canton Ledger
-- Use ``--admin-port`` with the `daml script` CLI tool.
-- Lists the vetted packages on the default participant.
listVettedPackages : HasCallStack => Script [PackageName]
listVettedPackages = lift ListVettedPackages

-- | MOVE Daml.Script.Internal
-- Lists all packages (vetted and unvetted) on the default participant
-- Note that the Admin API port must be provided when using this with a Canton Ledger
-- Use ``--admin-port`` with the `daml script` CLI tool.
-- Lists all packages (vetted and unvetted) on the default participant.
listAllPackages : HasCallStack => Script [PackageName]
listAllPackages = lift ListAllPackages
Original file line number Diff line number Diff line change
Expand Up @@ -58,34 +58,18 @@ allocatePartyByHint (PartyIdHint idHint) = lift $ AllocateParty with
-- Allocate a party with the given display name
-- on the specified participant using the party management service.
allocatePartyOn : Text -> ParticipantName -> Script Party
allocatePartyOn requestedName participantName = allocatePartyWithHintOn requestedName (PartyIdHint "") participantName
allocatePartyOn requestedName (ParticipantName participant) = lift $ AllocateParty with
requestedName = requestedName
idHint = ""
participants = [participant]

{-# DEPRECATED allocatePartyWithHintOn "Daml 3.3 compatibility helper, use 'allocatePartyByHintOn' instead of 'allocatePartyWithHintOn'" #-}
-- | MOVE Daml.Script
allocatePartyWithHintOn : Text -> PartyIdHint -> ParticipantName -> Script Party
allocatePartyWithHintOn requestedName idHint participant =
allocateReplicatedPartyWithHintOn requestedName idHint participant []

-- TODO(https://github.com/digital-asset/daml/issues/21035): rework allocateParty to avoid the proliferation of variants
-- | MOVE Daml.Script.Internal
-- Allocate a party with the given display name on the specified main participant using the party management service
-- and replicates it to the specified (possibly empty) list of additional participants. Commands submitted by the
-- allocated party will be routed to the main participant.
allocateReplicatedPartyOn : Text -> ParticipantName -> [ParticipantName] -> Script Party
allocateReplicatedPartyOn requestedName mainParticipant additionalParticipants =
allocateReplicatedPartyWithHintOn requestedName (PartyIdHint "") mainParticipant additionalParticipants

-- TODO(https://github.com/digital-asset/daml/issues/21035): rework allocateParty to avoid the proliferation of variants
-- | MOVE Daml.Script.Internal
-- Allocate a party with the given display name and id hint on the specified main participant using the party
-- management service and replicates it to the specified (possibly empty) list of additional participants. Commands
-- submitted by the allocated party will be routed to the main participant.
allocateReplicatedPartyWithHintOn : Text -> PartyIdHint -> ParticipantName -> [ParticipantName] -> Script Party
allocateReplicatedPartyWithHintOn requestedName (PartyIdHint idHint) mainParticipant additionalParticipants =
lift $ AllocateParty with
requestedName = requestedName
idHint = idHint
participants = map participantName (mainParticipant :: additionalParticipants)
allocatePartyWithHintOn requestedName (PartyIdHint idHint) (ParticipantName participant) = lift $ AllocateParty with
requestedName = requestedName
idHint = idHint
participants = [participant]

-- | MOVE Daml.Script
-- Allocate a party with the given id hint
Expand Down
28 changes: 2 additions & 26 deletions sdk/docs/sharable/hoogle/daml-script-hoogle.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.