.. _module-splice-api-token-burnmintv1-45547: Splice.Api.Token.BurnMintV1 =========================== An interface for registries to expose burn/mint operations in a generic way for bridges to use them, and for wallets to parse their use\. Interfaces ---------- .. _type-splice-api-token-burnmintv1-burnmintfactory-79205: **interface** `BurnMintFactory `_ A factory for generic burn/mint operations\. **viewtype** `BurnMintFactoryView `_ + **Choice** Archive Controller\: Signatories of implementing template Returns\: () (no fields) + .. _type-splice-api-token-burnmintv1-burnmintfactoryburnmint-20312: **Choice** `BurnMintFactory_BurnMint `_ Burn the holdings in ``inputHoldingCids`` and create holdings with the owners and amounts specified in outputs\. Note that this is jointly authorized by the admin and the ``extraActors``\. The ``admin`` thus controls all calls to this choice, and some implementations might required ``extraActors`` to be present, e\.g\., the owners of the minted and burnt holdings\. Implementations are free to restrict the implementation of this choice including failing on all inputs or not implementing this interface at all\. Controller\: (DA\.Internal\.Record\.getField @\"admin\" (view this)) \:\: extraActors Returns\: `BurnMintFactory_BurnMintResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - expectedAdmin - `Party `_ - The expected ``admin`` party issuing the factory\. Implementations MUST validate that this matches the admin of the factory\. Callers should ensure they get ``expectedAdmin`` from a trusted source, e\.g\., a read against their own participant\. That way they can ensure that it is safe to exercise a choice on a factory contract acquired from an untrusted source *provided* all vetted Daml packages only contain interface implementations that check the expected admin party\. * - instrumentId - InstrumentId - The instrument id of the holdings\. All holdings in ``inputHoldingCids`` as well as the resulting output holdings MUST have this instrument id\. * - inputHoldingCids - \[`ContractId `_ Holding\] - The holdings that should be burnt\. All holdings in ``inputHoldingCids`` MUST be archived by this choice\. Implementations MAY enforce additional restrictions such as all ``inputHoldingCids`` belonging to the same owner\. * - outputs - \[`BurnMintOutput `_\] - The holdings that should be created\. The choice MUST create new holdings with the given amounts\. * - extraActors - \[`Party `_\] - Extra actors, the full actors required are the admin \+ extraActors\. This is often the owners of inputHoldingCids and outputs but we allow different sets of actors to support token implementations with different authorization setups\. * - extraArgs - ExtraArgs - Additional context\. Implementations SHOULD include a ``splice.lfdecentralizedtrust.org/reason`` key in the metadata to provide a human readable description for explain why the ``BurnMintFactory_BurnMint`` choice was called, so that generic wallets can display it to the user\. + .. _type-splice-api-token-burnmintv1-burnmintfactorypublicfetch-64185: **Choice** `BurnMintFactory_PublicFetch `_ Controller\: actor Returns\: `BurnMintFactoryView `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - expectedAdmin - `Party `_ - The expected admin party issuing the factory\. Implementations MUST validate that this matches the admin of the factory\. Callers should ensure they get ``expectedAdmin`` from a trusted source, e\.g\., a read against their own participant\. That way they can ensure that it is safe to exercise a choice on a factory contract acquired from an untrusted source *provided* all vetted Daml packages only contain interface implementations that check the expected admin party\. * - actor - `Party `_ - The party fetching the data\. + **Method burnMintFactory\_burnMintImpl \:** `ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_BurnMint `_ \-\> `Update `_ `BurnMintFactory_BurnMintResult `_ + **Method burnMintFactory\_publicFetchImpl \:** `ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_PublicFetch `_ \-\> `Update `_ `BurnMintFactoryView `_ Data Types ---------- .. _type-splice-api-token-burnmintv1-burnmintfactoryview-72718: **data** `BurnMintFactoryView `_ The view of a ``BurnMintFactory``\. .. _constr-splice-api-token-burnmintv1-burnmintfactoryview-23617: `BurnMintFactoryView `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - admin - `Party `_ - The party representing the registry app that administers the instruments for which this burnt\-mint factory can be used\. * - meta - Metadata - Additional metadata specific to the burn\-mint factory, used for extensibility\. **instance** `Eq `_ `BurnMintFactoryView `_ **instance** `Show `_ `BurnMintFactoryView `_ **instance** HasMethod `BurnMintFactory `_ \"burnMintFactory\_publicFetchImpl\" (`ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_PublicFetch `_ \-\> `Update `_ `BurnMintFactoryView `_) **instance** `HasFromAnyView `_ `BurnMintFactory `_ `BurnMintFactoryView `_ **instance** `HasInterfaceView `_ `BurnMintFactory `_ `BurnMintFactoryView `_ **instance** `GetField `_ \"admin\" `BurnMintFactoryView `_ `Party `_ **instance** `GetField `_ \"meta\" `BurnMintFactoryView `_ Metadata **instance** `SetField `_ \"admin\" `BurnMintFactoryView `_ `Party `_ **instance** `SetField `_ \"meta\" `BurnMintFactoryView `_ Metadata **instance** `HasExercise `_ `BurnMintFactory `_ `BurnMintFactory_PublicFetch `_ `BurnMintFactoryView `_ **instance** `HasExerciseGuarded `_ `BurnMintFactory `_ `BurnMintFactory_PublicFetch `_ `BurnMintFactoryView `_ **instance** `HasFromAnyChoice `_ `BurnMintFactory `_ `BurnMintFactory_PublicFetch `_ `BurnMintFactoryView `_ **instance** `HasToAnyChoice `_ `BurnMintFactory `_ `BurnMintFactory_PublicFetch `_ `BurnMintFactoryView `_ .. _type-splice-api-token-burnmintv1-burnmintfactoryburnmintresult-61365: **data** `BurnMintFactory_BurnMintResult `_ The result of calling the ``BurnMintFactory_BurnMint`` choice\. .. _constr-splice-api-token-burnmintv1-burnmintfactoryburnmintresult-13976: `BurnMintFactory_BurnMintResult `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - outputCids - \[`ContractId `_ Holding\] - The holdings created by the choice\. Must contain exactly the outputs specified in the choice argument in the same order\. **instance** `Eq `_ `BurnMintFactory_BurnMintResult `_ **instance** `Show `_ `BurnMintFactory_BurnMintResult `_ **instance** HasMethod `BurnMintFactory `_ \"burnMintFactory\_burnMintImpl\" (`ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_BurnMint `_ \-\> `Update `_ `BurnMintFactory_BurnMintResult `_) **instance** `GetField `_ \"outputCids\" `BurnMintFactory_BurnMintResult `_ \[`ContractId `_ Holding\] **instance** `SetField `_ \"outputCids\" `BurnMintFactory_BurnMintResult `_ \[`ContractId `_ Holding\] **instance** `HasExercise `_ `BurnMintFactory `_ `BurnMintFactory_BurnMint `_ `BurnMintFactory_BurnMintResult `_ **instance** `HasExerciseGuarded `_ `BurnMintFactory `_ `BurnMintFactory_BurnMint `_ `BurnMintFactory_BurnMintResult `_ **instance** `HasFromAnyChoice `_ `BurnMintFactory `_ `BurnMintFactory_BurnMint `_ `BurnMintFactory_BurnMintResult `_ **instance** `HasToAnyChoice `_ `BurnMintFactory `_ `BurnMintFactory_BurnMint `_ `BurnMintFactory_BurnMintResult `_ .. _type-splice-api-token-burnmintv1-burnmintoutput-36483: **data** `BurnMintOutput `_ The specification of a holding to create as part of the burn/mint operation\. .. _constr-splice-api-token-burnmintv1-burnmintoutput-15750: `BurnMintOutput `_ .. list-table:: :widths: 15 10 30 :header-rows: 1 * - Field - Type - Description * - owner - `Party `_ - The owner of the holding to create\. * - amount - `Decimal `_ - The amount of the holding to create\. * - context - ChoiceContext - Context specific to this output which can be used to support locking or other registry\-specific features\. **instance** `Eq `_ `BurnMintOutput `_ **instance** `Show `_ `BurnMintOutput `_ **instance** `GetField `_ \"amount\" `BurnMintOutput `_ `Decimal `_ **instance** `GetField `_ \"context\" `BurnMintOutput `_ ChoiceContext **instance** `GetField `_ \"outputs\" `BurnMintFactory_BurnMint `_ \[`BurnMintOutput `_\] **instance** `GetField `_ \"owner\" `BurnMintOutput `_ `Party `_ **instance** `SetField `_ \"amount\" `BurnMintOutput `_ `Decimal `_ **instance** `SetField `_ \"context\" `BurnMintOutput `_ ChoiceContext **instance** `SetField `_ \"outputs\" `BurnMintFactory_BurnMint `_ \[`BurnMintOutput `_\] **instance** `SetField `_ \"owner\" `BurnMintOutput `_ `Party `_ Functions --------- .. _function-splice-api-token-burnmintv1-burnmintfactoryburnmintimpl-9738: `burnMintFactory_burnMintImpl `_ \: `BurnMintFactory `_ \-\> `ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_BurnMint `_ \-\> `Update `_ `BurnMintFactory_BurnMintResult `_ .. _function-splice-api-token-burnmintv1-burnmintfactorypublicfetchimpl-75623: `burnMintFactory_publicFetchImpl `_ \: `BurnMintFactory `_ \-\> `ContractId `_ `BurnMintFactory `_ \-\> `BurnMintFactory_PublicFetch `_ \-\> `Update `_ `BurnMintFactoryView `_