Skip to main content
The Mint workflow creates new holdings of an instrument. Minting always takes two steps: one party proposes the mint, and the counterparty accepts it. A holding is only created when both the registrar and the holder have authorized the mint.

Overview

There are two ways to mint: In both flows, the holder is the party that receives the minted holding, and the party that proposed the mint can cancel it until it is accepted.
You can jump straight to a flow: Mint request · Mint offer · API integration · Troubleshooting.

Prerequisites

Before a mint can be accepted:
  • The Instrument Configuration for the instrument must exist.
  • The holder must satisfy the instrument’s issuer credential requirements. If no issuer credential requirements are defined, the credential check passes for any holder. See How Requirements Are Evaluated.
  • The instrument must not be paused, unless the holder is the registrar.
  • If the blocklist check is enabled for the instrument, the holder must not be on the registrar’s blocklist.
  • The mint must be accepted before its executeBefore time.
These checks run on-ledger, using the Instrument Configuration and credentials that the Registry App backend provides as choice context.
Holder credential requirements aren’t checked for mints. A holder that only satisfies the issuer credential requirements can receive a mint, but can’t transfer or allocate the minted holdings unless it also satisfies the holder credential requirements.

API integration

Every API step follows the same pattern:
  1. Call the Operator Backend API to get the choice context and the contracts that must be disclosed, such as the InstrumentConfiguration, the holder’s credentials, and the AllocationFactory.
  2. Exercise the choice through the JSON Ledger API, passing the choice context in extraArgs.context and the disclosures in disclosedContracts.
The endpoint paths are relative to the base URL of the Operator Backend API for your environment, see Base URLs. To accept, reject, or cancel a mint, first find the contract ID of the active MintRequest or MintOffer by querying the active contracts of the acting party, for example by matching the mint reference.
Mint requests and offers are created through the registrar’s AllocationFactory contract. Despite its name, it doesn’t only implement the Token Standard allocation interfaces, but also the transfer interfaces and the mint and burn workflows. The name is kept for backwards compatibility.

Mint request

The holder requests a mint, and the registrar accepts or rejects it.
1

Holder requests a mint

  1. Go to Mints and click Request Mint.
  2. Select the instrument.
  3. Enter the amount to mint.
  4. Enter a reference, for example the reason for the mint or the agreement under which the tokens are issued.
  5. Optionally, enter a label for the minted holding.
  6. Submit the request.
The request is listed under Mints until the registrar accepts or rejects it.
2

Registrar accepts or rejects the request

  1. Go to Mints and select the mint request.
  2. Click Accept, or click Reject and enter a reason.
After acceptance, the status changes to Accepted and then to Executed. The new holding is shown under Holdings for the holder.
3

Optional: Holder cancels the request

The holder can cancel a mint request until the registrar accepts it.
Go to Mints, select the mint request, and click Cancel.

Mint offer

The registrar offers a mint to a holder, and the holder accepts or rejects it.
The mint offer flow is currently not available in the dApp UI. Use the API to offer, accept, reject, or cancel mint offers.
1

Registrar offers a mint

  1. Get the AllocationFactory and choice context with POST /api/utilities/v0/registry/mint/v0/offer, passing the holder and the instrumentId.
  2. As the registrar, exercise AllocationFactory_OfferMint on the factory. The choice argument has the same shape as for a mint request.
The transaction creates a MintOffer contract.
2

Holder accepts or rejects the offer

  1. Get the choice context with POST /api/utilities/v0/registry/mint/v0/offer/{mintOfferId}/choice-contexts/accept (or /reject).
  2. As the holder, exercise MintOffer_Accept on the MintOffer, or MintOffer_Reject with a reason.
MintOffer_Accept returns the holdingCid of the minted holding.
3

Optional: Registrar cancels the offer

The registrar can cancel a mint offer until the holder accepts it.As the registrar, exercise MintOffer_Cancel on the MintOffer, using the choice context from POST /api/utilities/v0/registry/mint/v0/offer/{mintOfferId}/choice-contexts/cancel.

Mint details

Both flows use the same Mint payload:

Labels

Labels in mint and burn workflows require all involved parties to use Registry App version 0.14.2 or later.
The label of the minted holding is the receiver account (account ID) set in the mint metadata. It lets the holder keep holdings of the same instrument in separate accounts, as outlined in Accounts and Labels. The receiver account is part of the Mint payload, so it is set by the party that proposes the mint and is applied unchanged when the mint is accepted:
  • Mint request: the holder sets the receiver account when requesting the mint.
  • Mint offer: the receiver account is taken from the offer. MintOffer_Accept doesn’t take a label, so the holder can’t change it when accepting.
In the API, add the receiver account to the mint metadata:
  • If no receiver account ID is set, the holding is minted to the holder’s basic account with account ID "".

Troubleshooting

Next steps