Splice.Api.Token.MetadataV1
Types and interfaces for retrieving metadata about tokens.
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 form
ContractId AnyContract
and throughcoerceContractId
but not through any of the interface functions likefetchFromInterface
that check whether the template actually implements the interface.viewtype AnyContractView
Choice Archive
Controller: Signatories of implementing template
Returns: ()
(no fields)
Data Types
- type AnyContractId
-
A reference to some contract id. Use
coerceContractId
to convert from and to this type.
data AnyContractView
Not used. See the
AnyContract
interface for more information.(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.
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.
instance 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)
A generic result for choices that do not need to return specific data.
Field
Type
Description
meta
Additional metadata specific to the result of exercising the choice, used for extensibility.
instance Eq ChoiceExecutionMetadata
instance Show ChoiceExecutionMetadata
instance GetField "meta" ChoiceExecutionMetadata Metadata
instance SetField "meta" ChoiceExecutionMetadata Metadata
data ExtraArgs
A common type for passing both the choice context and the metadata to a choice.
Field
Type
Description
context
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
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.instance GetField "context" ExtraArgs ChoiceContext
instance GetField "meta" ExtraArgs Metadata
instance SetField "context" ExtraArgs ChoiceContext
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/).
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.
instance GetField "meta" ChoiceExecutionMetadata Metadata
instance GetField "meta" ExtraArgs Metadata
instance GetField "values" Metadata (TextMap Text)
instance SetField "meta" ChoiceExecutionMetadata Metadata
Functions
- emptyChoiceContext
-
Empty choice context.
- emptyMetadata
: Metadata
Empty metadata.
Comments