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.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 BurnMintFactory
A factory for generic burn/mint operations. viewtype BurnMintFactoryView
- Choice Archive Controller: Signatories of implementing template Returns: () (no fields)
Choice BurnMintFactory_BurnMintBurn the holdings ininputHoldingCidsand create holdings with the owners and amounts specified in outputs. Note that this is jointly authorized by the admin and theextraActors. Theadminthus controls all calls to this choice, and some implementations might requiredextraActorsto 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
Field Type Description expectedAdmin Party The expected adminparty issuing the factory. Implementations MUST validate that this matches the admin of the factory. Callers should ensure they getexpectedAdminfrom 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 inputHoldingCidsas well as the resulting output holdings MUST have this instrument id.inputHoldingCids [ContractId Holding] The holdings that should be burnt. All holdings in inputHoldingCidsMUST be archived by this choice. Implementations MAY enforce additional restrictions such as allinputHoldingCidsbelonging 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/reasonkey in the metadata to provide a human readable description for explain why theBurnMintFactory_BurnMintchoice was called, so that generic wallets can display it to the user. Choice BurnMintFactory_PublicFetchController: actor Returns: BurnMintFactoryView
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 expectedAdminfrom 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
data BurnMintFactoryView
The view of aBurnMintFactory.BurnMintFactoryViewinstance 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
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.
data BurnMintFactory_BurnMintResult
The result of calling theBurnMintFactory_BurnMintchoice.BurnMintFactory_BurnMintResultinstance 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
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.
data BurnMintOutput
The specification of a holding to create as part of the burn/mint operation.BurnMintOutputinstance 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
burnMintFactory_burnMintImpl
: BurnMintFactory -> ContractId BurnMintFactory -> BurnMintFactory_BurnMint -> Update BurnMintFactory_BurnMintResult
burnMintFactory_publicFetchImpl
: BurnMintFactory -> ContractId BurnMintFactory -> BurnMintFactory_PublicFetch -> Update BurnMintFactoryView