ChoiceContextJson
Bridges the registry's off-ledger JSON (Daml JSON API encoding) and the gRPC Ledger API's proto values.
Registries return choiceContextData as the Daml JSON encoding of Splice.Api.Token.MetadataV1.ChoiceContext — a TextMap of AnyValue variants ({"tag": "AV_ContractId", "value": "00…"}). The official TS SDK submits through the JSON API where that encoding is native; we submit over gRPC, so the context must be re-encoded as proto values. AnyValue's closed constructor set is what makes this translation total.
Functions
One AnyValue variant from Daml JSON to its proto encoding.
Daml JSON ChoiceContext -> proto record. Null/absent means an empty context.
ExtraArgs { context, meta } ready to embed in a choice-argument record.
TransferFactory_Transfer choice arguments in Daml JSON API encoding, for GetFactoryRequest.choiceArguments — extraArgs empty per spec.