> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-feature-integrate-google-analytics.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Splice.Api.Token.MetadataV1

> Documentation for Splice.Api.Token.MetadataV1

Types and interfaces for retrieving metadata about tokens.

## Interfaces

<div id="type-splice-api-token-metadatav1-anycontract-39598">
  **interface** AnyContract
</div>

> 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 through `coerceContractId` but not through any of the interface functions like `fetchFromInterface` that check whether the template actually implements the interface.
>
> **viewtype** AnyContractView
>
> * **Choice** Archive
>
>   Controller: Signatories of implementing template
>
>   Returns: ()
>
>   (no fields)

## Data Types

<div id="type-splice-api-token-metadatav1-anycontractid-4875">
  **type** AnyContractId
  \= [ContractId](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-contractid-95282) AnyContract

  A reference to some contract id. Use `coerceContractId` to convert from and to this type.
</div>

<div id="type-splice-api-token-metadatav1-anycontractview-55353">
  **data** AnyContractView
</div>

> Not used. See the `AnyContract` interface for more information.
>
> <div id="constr-splice-api-token-metadatav1-anycontractview-50558">
>   AnyContractView
> </div>
>
> > (no fields)
>
> **instance** [HasFromAnyView](https://docs.daml.com/daml/stdlib/DA-Internal-Interface-AnyView.html#class-da-internal-interface-anyview-hasfromanyview-30108) AnyContract AnyContractView
>
> **instance** [HasInterfaceView](https://docs.daml.com/daml/stdlib/Prelude.html#class-da-internal-interface-hasinterfaceview-4492) AnyContract AnyContractView

<div id="type-splice-api-token-metadatav1-anyvalue-34700">
  **data** AnyValue
</div>

> 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.
>
> <div id="constr-splice-api-token-metadatav1-avtext-20580">
>   AV\_Text [Text](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-text-51952)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avint-52425">
>   AV\_Int [Int](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-int-37261)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avdecimal-71267">
>   AV\_Decimal [Decimal](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-decimal-18135)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avbool-76457">
>   AV\_Bool [Bool](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-bool-66265)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avdate-46205">
>   AV\_Date [Date](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-date-32253)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avtime-30398">
>   AV\_Time [Time](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-time-63886)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avreltime-31008">
>   AV\_RelTime [RelTime](https://docs.daml.com/daml/stdlib/DA-Time.html#type-da-time-types-reltime-23082)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avparty-78344">
>   AV\_Party [Party](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-party-57932)
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avcontractid-3242">
>   AV\_ContractId AnyContractId
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avlist-50505">
>   AV\_List \[AnyValue]
> </div>
>
> <div id="constr-splice-api-token-metadatav1-avmap-39932">
>   AV\_Map ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) AnyValue)
> </div>
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) AnyValue
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) AnyValue
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "values" ChoiceContext ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) AnyValue)
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "values" ChoiceContext ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) AnyValue)

<div id="type-splice-api-token-metadatav1-choicecontext-5566">
  **data** ChoiceContext
</div>

> A type for passing extra data from an app's backends to the choices of that app exercised in commands submitted by app users.
>
> <div id="constr-splice-api-token-metadatav1-choicecontext-36049">
>   ChoiceContext
> </div>
>
> > | Field  | Type                                                                                                 | Description                                                                                                                                    |
> > | ------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
> > | values | [TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) 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. |
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) ChoiceContext
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) ChoiceContext
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "context" ExtraArgs ChoiceContext
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "values" ChoiceContext ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) AnyValue)
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "context" ExtraArgs ChoiceContext
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "values" ChoiceContext ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) AnyValue)

<div id="type-splice-api-token-metadatav1-choiceexecutionmetadata-98464">
  **data** ChoiceExecutionMetadata
</div>

> A generic result for choices that do not need to return specific data.
>
> <div id="constr-splice-api-token-metadatav1-choiceexecutionmetadata-73543">
>   ChoiceExecutionMetadata
> </div>
>
> > | Field | Type     | Description                                                                                  |
> > | ----- | -------- | -------------------------------------------------------------------------------------------- |
> > | meta  | Metadata | Additional metadata specific to the result of exercising the choice, used for extensibility. |
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) ChoiceExecutionMetadata
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) ChoiceExecutionMetadata
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "meta" ChoiceExecutionMetadata Metadata
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "meta" ChoiceExecutionMetadata Metadata

<div id="type-splice-api-token-metadatav1-extraargs-90869">
  **data** ExtraArgs
</div>

> A common type for passing both the choice context and the metadata to a choice.
>
> <div id="constr-splice-api-token-metadatav1-extraargs-16750">
>   ExtraArgs
> </div>
>
> > | 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. |
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) ExtraArgs
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) ExtraArgs
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "context" ExtraArgs ChoiceContext
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "meta" ExtraArgs Metadata
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "context" ExtraArgs ChoiceContext
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "meta" ExtraArgs Metadata

<div id="type-splice-api-token-metadatav1-metadata-21206">
  **data** Metadata
</div>

> 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/\(\[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.
>
> <div id="constr-splice-api-token-metadatav1-metadata-84299">
>   Metadata
> </div>
>
> > | Field  | Type                                                                                                                                                                         | Description                          |
> > | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
> > | values | [TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) [Text](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-text-51952) | Key-value pairs of metadata entries. |
>
> **instance** [Eq](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-eq-22713) Metadata
>
> **instance** [Ord](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-classes-ord-6395) Metadata
>
> **instance** [Show](https://docs.daml.com/daml/stdlib/Prelude.html#class-ghc-show-show-65360) Metadata
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "meta" ChoiceExecutionMetadata Metadata
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "meta" ExtraArgs Metadata
>
> **instance** [GetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-getfield-53979) "values" Metadata ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) [Text](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-text-51952))
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "meta" ChoiceExecutionMetadata Metadata
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "meta" ExtraArgs Metadata
>
> **instance** [SetField](https://docs.daml.com/daml/stdlib/DA-Record.html#class-da-internal-record-setfield-4311) "values" Metadata ([TextMap](https://docs.daml.com/daml/stdlib/Prelude.html#type-da-internal-lf-textmap-11691) [Text](https://docs.daml.com/daml/stdlib/Prelude.html#type-ghc-types-text-51952))

## Functions

<div id="function-splice-api-token-metadatav1-emptychoicecontext-1208">
  emptyChoiceContext
  : ChoiceContext

  Empty choice context.
</div>

<div id="function-splice-api-token-metadatav1-emptymetadata-88176">
  emptyMetadata
  : Metadata

  Empty metadata.
</div>
