Types and interfaces for retrieving metadata about tokens.Documentation Index
Fetch the complete documentation index at: https://cantonfoundation-issue-365-details-history.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Interfaces
interface AnyContract
Interface used to represent arbitrary contracts. Note that this is not expected to be implemented by any template, so it should only be used in the formContractId AnyContractand throughcoerceContractIdbut not through any of the interface functions likefetchFromInterfacethat check whether the template actually implements the interface. viewtype AnyContractView
- Choice Archive Controller: Signatories of implementing template Returns: () (no fields)
Data Types
type AnyContractId
= ContractId AnyContractA reference to some contract id. Use
coerceContractId to convert from and to this type.data AnyContractView
Not used. See theAnyContractinterface for more information.AnyContractView(no fields)instance HasFromAnyView AnyContract AnyContractView instance HasInterfaceView AnyContract AnyContractView
data AnyValue
A generic representation of serializable Daml values. Used to pass arbitrary data across interface boundaries. For example to pass data from an an app backend to an interface choice implementation.AV_Text TextAV_Int IntAV_Decimal DecimalAV_Bool BoolAV_Date DateAV_Time TimeAV_RelTime RelTimeAV_Party PartyAV_ContractId AnyContractIdAV_List [AnyValue]AV_Map (TextMap AnyValue)instance Eq AnyValue instance Show AnyValue instance GetField “values” ChoiceContext (TextMap AnyValue) instance SetField “values” ChoiceContext (TextMap AnyValue)
data ChoiceContext
A type for passing extra data from an app’s backends to the choices of that app exercised in commands submitted by app users.ChoiceContextinstance Eq ChoiceContext instance Show ChoiceContext instance GetField “context” ExtraArgs ChoiceContext instance GetField “values” ChoiceContext (TextMap AnyValue) instance SetField “context” ExtraArgs ChoiceContext instance SetField “values” ChoiceContext (TextMap AnyValue)
Field Type Description values TextMap AnyValue The values passed in by the app backend to the choice. The keys are considered internal to the app and should not be read by third-party code.
data ChoiceExecutionMetadata
A generic result for choices that do not need to return specific data.ChoiceExecutionMetadatainstance Eq ChoiceExecutionMetadata instance Show ChoiceExecutionMetadata instance GetField “meta” ChoiceExecutionMetadata Metadata instance SetField “meta” ChoiceExecutionMetadata Metadata
Field Type Description meta Metadata Additional metadata specific to the result of exercising the choice, used for extensibility.
data ExtraArgs
A common type for passing both the choice context and the metadata to a choice.ExtraArgsinstance Eq ExtraArgs instance Show ExtraArgs instance GetField “context” ExtraArgs ChoiceContext instance GetField “meta” ExtraArgs Metadata instance SetField “context” ExtraArgs ChoiceContext instance SetField “meta” ExtraArgs Metadata
Field Type Description context ChoiceContext Extra arguments to be passed to the implementation of an interface choice. These are provided via an off-ledger API by the app implementing the interface. meta Metadata Additional metadata to pass in. In contrast to the extraArgs, these are provided by the caller of the choice. The expectation is that the meaning of metadata fields will be agreed on in later standards, or on a case-by-case basis between the caller and the implementer of the interface.
data Metadata
Machine-readable metadata intended for communicating additional information using well-known keys between systems. This is mainly used to allow for the post-hoc expansion of the information associated with contracts and choice arguments and results. Modeled after by k8s support for annotations: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/([https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)\\](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/)\). Implementors SHOULD follow the same conventions for allocating keys as used by k8s; i.e., they SHOULD be prefixed using the DNS name of the app defining the key. Implementors SHOULD keep metadata small, as on-ledger data is costly.Metadatainstance Eq Metadata instance Ord Metadata instance Show Metadata instance GetField “meta” ChoiceExecutionMetadata Metadata instance GetField “meta” ExtraArgs Metadata instance GetField “values” Metadata (TextMap Text) instance SetField “meta” ChoiceExecutionMetadata Metadata instance SetField “meta” ExtraArgs Metadata instance SetField “values” Metadata (TextMap Text)
Functions
emptyChoiceContext
: ChoiceContextEmpty choice context.
emptyMetadata
: MetadataEmpty metadata.