Skip to content
Back to skills

Eerc Mint Burn

ASecurity

Use when the agent needs to mint or burn eERC tokens in standalone mode — privateMint and privateBurn via the SDK, including the auditor PCT and balance handling. Standalone-only operations.

  • 30 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 8, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned November 8, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill eerc-mint-burn --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Eerc Mint Burn?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Eerc Mint Burn
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-eerc-mint-burn/badge)](https://www.skillsdirectory.com/skills/majiayu000-eerc-mint-burn)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: eerc-mint-burn
description: Use when the agent needs to mint or burn eERC tokens in standalone mode — privateMint and privateBurn via the SDK, including the auditor PCT and balance handling. Standalone-only operations.
category: eERC
difficulty: Intermediate
version: "0.1.0"
---

# eERC — Private Mint & Burn (Standalone)

## Overview
In **standalone mode** ([[eerc-deployment-modes]]), supply is managed by **`privateMint`** (create encrypted tokens) and **`privateBurn`** (destroy them). Both run client-side proof generation and update encrypted balances homomorphically. These do **not** exist in converter mode (use deposit/withdraw there).

## Private mint
```ts
const { privateMint } = eerc.useEncryptedBalance();
// recipient must be registered
const { transactionHash } = await privateMint(recipientAddress, amount /* bigint */);
```
- Typically restricted to the contract **owner**.
- The SDK encrypts the minted amount with the recipient's public key and encodes an **auditor PCT** so the auditor can decrypt it later.
- Mint circuit (`mint.wasm`/`mint.zkey`) must be configured ([[eerc-sdk-setup]]).

## Private burn
```ts
const { privateBurn } = eerc.useEncryptedBalance();
const { transactionHash } = await privateBurn(amount /* bigint, <= decryptedBalance */);
```
- Burns from the caller's encrypted balance; requires a loaded decryption key and `0 < amount <= decryptedBalance`.
- Uses the burn circuit and current encrypted balance to prove the new balance is correct.

## After either op
```ts
await refetchBalance();
```

## Gas (C-Chain reference)
- `privateMint` ≈ 0.72M gas avg. `privateBurn` ≈ 1.03M gas avg. Plan UX for proof + verification latency.

## Common Pitfalls
- **Using mint/burn in converter mode.** They revert; converter uses `deposit`/`withdraw` ([[eerc-deposit-withdraw]]).
- **Unregistered recipient for mint.** The mint target needs a registered public key.
- **Auditor key unset.** Operations encode an auditor PCT and expect a valid auditor public key ([[eerc-auditor-compliance]]).
- **Amount scaling.** `amount` is a `bigint` in base units; scale by `decimals`.

## AI Agent Prompt
> "Act as an eERC engineer. Implement owner-gated `privateMint` to a registered recipient and user `privateBurn`, generating the proofs via the SDK and refetching the decrypted balance."

## References
See `references/README.md` (ac-eerc-sdk `useEncryptedBalance.tsx` privateMint/privateBurn, `EERC.ts`).

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.