Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.canton.network/llms.txt

Use this file to discover all available pages before exploring further.

Utility template for proxying token standard choices so that featured app markers are created when using extra parties for operating an app. You can either use this template directly, or copy the code under a different package name and a different module name. Note: use the WalletUserProxy if you are building a wallet app and want your users to create featured app markers for you.

Templates

template DelegateProxy
A proxy for a delegate to create featured app markers jointly with using token standard workflows. The delegate is given full control over the creation of the markers. This is for example useful when using one or more parties for app operation purposes. Using this proxy allows the operational parties to properly attribute their activity to the featured app, which is represented by the app provider party. Signatory: provider
FieldTypeDescription
providerPartyThe app provider whose featured app right should be used
delegatePartyThe delegate interacting with the token standard workflow
  • Choice Archive Controller: provider Returns: () (no fields)
  • Choice DelegateProxy_AllocationFactory_Allocate
    Controller: delegate Returns: ProxyResult AllocationInstructionResult
    FieldTypeDescription
    cidContractId AllocationFactory
    proxyArgProxyArg AllocationFactory_Allocate
  • Choice DelegateProxy_Allocation_Withdraw
    Controller: delegate Returns: ProxyResult Allocation_WithdrawResult
    FieldTypeDescription
    cidContractId Allocation
    proxyArgProxyArg Allocation_Withdraw
  • Choice DelegateProxy_TransferFactory_Transfer
    Controller: delegate Returns: ProxyResult TransferInstructionResult
    FieldTypeDescription
    cidContractId TransferFactory
    proxyArgProxyArg TransferFactory_Transfer
  • Choice DelegateProxy_TransferInstruction_Accept
    Controller: delegate Returns: ProxyResult TransferInstructionResult
    FieldTypeDescription
    cidContractId TransferInstruction
    proxyArgProxyArg TransferInstruction_Accept
  • Choice DelegateProxy_TransferInstruction_Reject
    Controller: delegate Returns: ProxyResult TransferInstructionResult
    FieldTypeDescription
    cidContractId TransferInstruction
    proxyArgProxyArg TransferInstruction_Reject
  • Choice DelegateProxy_TransferInstruction_Withdraw
    Controller: delegate Returns: ProxyResult TransferInstructionResult
    FieldTypeDescription
    cidContractId TransferInstruction
    proxyArgProxyArg TransferInstruction_Withdraw

Data Types

data ProxyArg arg
Generic argument to the proxy choices.
ProxyArg
FieldTypeDescription
choiceArgargThe argument to the choice that the delegate is exercising.
featuredAppRightCidContractId FeaturedAppRightThe featured app right contract of the provider.
beneficiaries[AppRewardBeneficiary]The beneficiaries for the activity marker.
instance Eq arg => Eq (ProxyArg arg) instance Show arg => Show (ProxyArg arg) instance GetField “beneficiaries” (ProxyArg arg) [AppRewardBeneficiary] instance GetField “choiceArg” (ProxyArg arg) arg instance GetField “featuredAppRightCid” (ProxyArg arg) (ContractId FeaturedAppRight) instance GetField “proxyArg” DelegateProxy_AllocationFactory_Allocate (ProxyArg AllocationFactory_Allocate) instance GetField “proxyArg” DelegateProxy_Allocation_Withdraw (ProxyArg Allocation_Withdraw) instance GetField “proxyArg” DelegateProxy_TransferFactory_Transfer (ProxyArg TransferFactory_Transfer) instance GetField “proxyArg” DelegateProxy_TransferInstruction_Accept (ProxyArg TransferInstruction_Accept) instance GetField “proxyArg” DelegateProxy_TransferInstruction_Reject (ProxyArg TransferInstruction_Reject) instance GetField “proxyArg” DelegateProxy_TransferInstruction_Withdraw (ProxyArg TransferInstruction_Withdraw) instance SetField “beneficiaries” (ProxyArg arg) [AppRewardBeneficiary] instance SetField “choiceArg” (ProxyArg arg) arg instance SetField “featuredAppRightCid” (ProxyArg arg) (ContractId FeaturedAppRight) instance SetField “proxyArg” DelegateProxy_AllocationFactory_Allocate (ProxyArg AllocationFactory_Allocate) instance SetField “proxyArg” DelegateProxy_Allocation_Withdraw (ProxyArg Allocation_Withdraw) instance SetField “proxyArg” DelegateProxy_TransferFactory_Transfer (ProxyArg TransferFactory_Transfer) instance SetField “proxyArg” DelegateProxy_TransferInstruction_Accept (ProxyArg TransferInstruction_Accept) instance SetField “proxyArg” DelegateProxy_TransferInstruction_Reject (ProxyArg TransferInstruction_Reject) instance SetField “proxyArg” DelegateProxy_TransferInstruction_Withdraw (ProxyArg TransferInstruction_Withdraw)
data ProxyResult r
Generic result of the proxy choices.
ProxyResult
FieldTypeDescription
markerResultFeaturedAppRight_CreateActivityMarkerResult
choiceResultr
instance GetField “choiceResult” (ProxyResult r) r instance GetField “markerResult” (ProxyResult r) FeaturedAppRight_CreateActivityMarkerResult instance SetField “choiceResult” (ProxyResult r) r instance SetField “markerResult” (ProxyResult r) FeaturedAppRight_CreateActivityMarkerResult instance HasExercise DelegateProxy DelegateProxy_AllocationFactory_Allocate (ProxyResult AllocationInstructionResult) instance HasExercise DelegateProxy DelegateProxy_Allocation_Withdraw (ProxyResult Allocation_WithdrawResult) instance HasExercise DelegateProxy DelegateProxy_TransferFactory_Transfer (ProxyResult TransferInstructionResult) instance HasExercise DelegateProxy DelegateProxy_TransferInstruction_Accept (ProxyResult TransferInstructionResult) instance HasExercise DelegateProxy DelegateProxy_TransferInstruction_Reject (ProxyResult TransferInstructionResult) instance HasExercise DelegateProxy DelegateProxy_TransferInstruction_Withdraw (ProxyResult TransferInstructionResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_AllocationFactory_Allocate (ProxyResult AllocationInstructionResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_Allocation_Withdraw (ProxyResult Allocation_WithdrawResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_TransferFactory_Transfer (ProxyResult TransferInstructionResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Accept (ProxyResult TransferInstructionResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Reject (ProxyResult TransferInstructionResult) instance HasFromAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Withdraw (ProxyResult TransferInstructionResult) instance HasToAnyChoice DelegateProxy DelegateProxy_AllocationFactory_Allocate (ProxyResult AllocationInstructionResult) instance HasToAnyChoice DelegateProxy DelegateProxy_Allocation_Withdraw (ProxyResult Allocation_WithdrawResult) instance HasToAnyChoice DelegateProxy DelegateProxy_TransferFactory_Transfer (ProxyResult TransferInstructionResult) instance HasToAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Accept (ProxyResult TransferInstructionResult) instance HasToAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Reject (ProxyResult TransferInstructionResult) instance HasToAnyChoice DelegateProxy DelegateProxy_TransferInstruction_Withdraw (ProxyResult TransferInstructionResult)

Functions

exerciseProxyChoice : HasExercise t ch r => DelegateProxy -> ContractId t -> ProxyArg ch -> Update (ProxyResult r)Shared code to execute the proxied choice.
require : CanAssert m => Text -> Bool -> m ()Check whether a required condition is true. If it’s not, abort the transaction with a message saying that the requirement was not met.