This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
transferAsset: ContractId Asset -> Party -> Update (ContractId Asset) | |
transferAsset assetCid recipient = do | |
asset <- fetch assetCid | |
archive assetCid | |
create asset with | |
owner = recipient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assetCid <- create Asset with .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template Asset | |
with | |
owner : Party | |
amount : Decimal | |
where | |
signatory owner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Status = NotStarted | Started | Reviewed deriving (Eq, Show) | |
template Task | |
with | |
lead : Party | |
manager : Party | |
developer : Party | |
status : Status | |
where | |
signatory lead |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template Distribution | |
with | |
fromDistributor: Party | |
toDistributor: Party | |
event: Text | |
tickets: Int | |
where | |
signatory fromDistributor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data VerifiableCredentials = VerifiableCredentials | |
with | |
connectionid : Text | |
holder_did : Text | |
issuer_did : Text | |
deriving (Eq, Show) | |
controller healthClinic can | |
nonconsuming SetVerifiableCredentials : ContractId CitizenCredentialsProposal | |
with |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template HealthClinicRole | |
with | |
operator : Party | |
healthclinic : Party | |
healthclinicdetails : HealthClinicDetails | |
where | |
signatory operator, healthclinic | |
key (operator, healthclinic) : (Party, Party) | |
maintainer key._1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template TestRequest | |
with | |
operator : Party | |
healthclinic : Party | |
citizen: Party | |
where | |
signatory citizen | |
observer operator | |
controller healthclinic can |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template CitizenRole | |
with | |
operator : Party | |
citizen : Party | |
citizendetails : CitizenDetails | |
verifiablecredentials : VerifiableCredentials | |
where | |
signatory operator, citizen | |
key (operator, citizen) : (Party, Party) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Roletype = Citizen | HealthClinic | StateHealthAgency | InsuranceCompany | |
deriving (Eq, Show) | |
template Network | |
with | |
operator : Party | |
where | |
signatory operator | |