<p>To deal minting policy we should consider 2 parts:</p>
<ol>
<li>On-chain part</li>
</ol>
<p>We need to have a minting script that is written in Plutus. In this minting script, we could define the logic we want to have. For instance, which wallet can mint/burn, a list of wallets can mint/burn, the limited time range allows minting/burning, etc.</p>
<p>The following is an example of a minting script that requires a specific address to mint.</p>
<p><a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/Signed.hs" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/Signed.hs</a></p>
<ol start="2">
<li>Off-chain part</li>
</ol>
<p>Off-chain part is for creating transactions that use the minting script prepared above to mint or burn native assets. In this part, we can define how many native assets we would like to mint/burn in those transactions.</p>
<p>The following is the off-chain code to use the minting script above (It uses lucid library instead of cardano-wallet, but I think the approach is almost the same).</p>
<p><a href="https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/lucid-signed.ts" rel="nofollow noreferrer">https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/lucid-signed.ts</a></p>
<p>Thus, the cardano-wallet mentioned in the API documentation is for the off-chain part only I think. And we need On chain part to create native assets.</p>
<p>See more,</p>
<ol>
<li><a href="https://www.youtube.com/watch?v=g_VoKPK-tk0&amp;ab_channel=IOGAcademy" rel="nofollow noreferrer">https://www.youtube.com/watch?v=g_VoKPK-tk0&amp;ab_channel=IOGAcademy</a></li>
<li><a href="https://www.youtube.com/watch?v=Faru8_Br2Xg&amp;ab_channel=IOGAcademy" rel="nofollow noreferrer">https://www.youtube.com/watch?v=Faru8_Br2Xg&amp;ab_channel=IOGAcademy</a></li>
</ol>
<p>Hope this is helpful!</p>

CC BY-SA 4.0
2023-04-16T11:57:28.620Z
2023-04-16T11:57:48.363Z
2023-04-16T11:57:48.363Z
manhdt
<p>It is not possible to create complex monetary policies using the <code>cardano-wallet</code>. As far as I know, it is not even possible to create a time lock for the policy in it.</p>
<blockquote>
<p>For example, we want our policy to allow future minting by a specific wallet id, among other attributes.</p>
</blockquote>
<p>For such policy, you might need to use Plutus.</p>

CC BY-SA 4.0
2021-11-21T22:18:22.633Z
2021-11-21T22:18:22.633Z
Marek Mahut - StakeNuts
<p>The <code>cardano-wallet</code> api documentation describes an endpoint which appears useful for minting native assets (<a href="https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/mintBurnAssets" rel="nofollow noreferrer">https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/mintBurnAssets</a>). Everything in the request seems pretty straightforward except for the way in which you would go about defining the monetary policy. For example, we want our policy to allow future minting by a specific wallet id, among other attributes.</p>
<p>The only field in this api call which appears related to monetary policy is the <code>monetary_policy_index</code> field inside the <code>mint_burn</code> list. This field takes a string, but as there is no example usage, it's unclear to me how to use that to define a complex monetary policy.</p>
<p>Does anyone have a concrete example of minting native assets using <code>cardano-wallet</code>?</p>

<wallet><native-assets>
Using cardano-wallet to mint native assets
# Using cardano-wallet to mint native assets

(Asked by: username_0 on 2021-11-20)

The `cardano-wallet` api documentation describes an endpoint which appears useful for minting native assets (<https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/mintBurnAssets>). Everything in the request seems pretty straightforward except for the way in which you would go about defining the monetary policy. For example, we want our policy to allow future minting by a specific wallet id, among other attributes.

The only field in this api call which appears related to monetary policy is the `monetary_policy_index` field inside the `mint_burn` list. This field takes a string, but as there is no example usage, it's unclear to me how to use that to define a complex monetary policy.

Does anyone have a concrete example of minting native assets using `cardano-wallet`?

**Tags:** wallet, native-assets

---

## 2 answers

### Answer by username_1 on 2023-04-16. Score: 1

To deal minting policy we should consider 2 parts:

1. On-chain part

We need to have a minting script that is written in Plutus. In this minting script, we could define the logic we want to have. For instance, which wallet can mint/burn, a list of wallets can mint/burn, the limited time range allows minting/burning, etc.

The following is an example of a minting script that requires a specific address to mint.

<https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/Signed.hs>

2. Off-chain part

Off-chain part is for creating transactions that use the minting script prepared above to mint or burn native assets. In this part, we can define how many native assets we would like to mint/burn in those transactions.

The following is the off-chain code to use the minting script above (It uses lucid library instead of cardano-wallet, but I think the approach is almost the same).

<https://github.com/input-output-hk/plutus-pioneer-program/blob/3bfe927ae0b229290a00f2746fc248d02f0ca9d5/code/Week05/lecture/lucid-signed.ts>

Thus, the cardano-wallet mentioned in the API documentation is for the off-chain part only I think. And we need On chain part to create native assets.

See more,

1. <https://www.youtube.com/watch?v=g_VoKPK-tk0&ab_channel=IOGAcademy>
2. <https://www.youtube.com/watch?v=Faru8_Br2Xg&ab_channel=IOGAcademy>

Hope this is helpful!


---

### Answer by username_2 on 2021-11-21. Score: 0

It is not possible to create complex monetary policies using the `cardano-wallet`. As far as I know, it is not even possible to create a time lock for the policy in it.

> For example, we want our policy to allow future minting by a specific wallet id, among other attributes.

For such policy, you might need to use Plutus.


---

