Skip to content

Conversation

@gitteri
Copy link
Contributor

@gitteri gitteri commented Dec 1, 2025

Add Confidential Mint/Burn instructions and types

Summary

This updates interface/idl.json to expose the Confidential Mint/Burn extension in the public IDL so downstream code generators (JS, Rust, etc.) can produce clients with first-class support. Also fixes a minor docs typo.

What changed

  • Added six new instructions for Confidential Mint/Burn:
    • initializeConfidentialMintBurn: initialize extension during mint init
    • rotateSupplyElGamalPubkey: rotate supply ElGamal public key (pending burn must be zero)
    • updateDecryptableSupply: update decryptable supply for the mint
    • mintToConfidentialBalance: mint into confidential balance (with proof offsets)
    • burnFromConfidentialBalance: burn from confidential balance (with proof offsets)
    • applyPendingBurn: apply pending burn amount to confidential supply
  • Introduced two new defined types:
    • encryptedSupply (64 bytes ElGamal ciphertext)
    • decryptableSupply (36 bytes authenticated encryption)
  • Extension schema changes:
    • Replaced prior empty variant with a struct variant confidentialMintBurnConfig carrying:
      • supplyElgamalPubkey: PublicKey
      • decryptableSupply: encryptedSupply
    • Added a new marker variant confidentialMintBurn documenting inclusion of mint-burn configuration.
  • Fixed typo in docs:
    • “despots and transfers that an account can receiver” → “deposits and transfers that an account can receive”.
  • Reran command to generate new ts clients
    • Only generated the ts client for now

Motivation

  • Unblocks up-to-date, multi-language client generation for the Confidential Mint/Burn feature.
  • Aligns the IDL with the on-chain program’s capabilities and proof-wiring requirements.

Impact on generated clients

  • New client-side methods for the six instructions, with required accounts and proof instruction offsets.
  • New type definitions surfaced in SDKs for confidential supply representation.
  • Extension variant change from empty to struct will surface as a typed config object in generated clients.

Backward compatibility

  • Additive for instructions and types.
  • The extension enum shape changes from an empty variant to a struct variant for confidential mint-burn config; any consumer relying on the empty variant must adapt to the new structured variant name (confidentialMintBurnConfig) and fields. Generated clients will reflect this automatically after regeneration.

Follow-ups

  • Regenerate rust client to pick up the new IDL.
  • Add e2e tests in client repos covering mint/burn flows with proof offsets and multisig remaining accounts.

@gitteri gitteri changed the title [IDl] Add Confidential Mint/Burn instructions and types [IDL] Add Confidential Mint/Burn instructions and types Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant