Skip to content

Solana CT: SDK — confidential mint transaction building + proof-account approach (Sprint 1) #9381

Description

@bhavidhingra

Solana CT: SDK — Sprint 1

Build confidential transfer transaction construction in sdk-coin-sol. Uses the proof-account approach validated on Solana devnet.

Sprint 1 scope (this issue)

  1. Confidential mint transaction building (proof-account approach):

    • Record program account for range proof (1000B BatchedRangeProofU128 exceeds 1056B tx size limit)
    • Context state accounts for equality + validity proofs
    • Tx sequence: create-record + write(1-2) + 3 verify + 1 confidentialMint (~5-6 txs per mint)
    • currentSupplyCiphertext = on-chain confidential_supply (identity = 64 zero bytes for fresh mint)
  2. ConfigureConfidentialTransferAccount instruction:

    • One-time ATA setup — register ElGamal pubkey + AES key
    • Part of the token account configuration flow
  3. Proof-account tx group sequencing (SendQ skeleton):

    • Group the 5-6 txs for a single mint/burn as one logical unit (create-record → write → 3 verify → confidentialMint)
    • SendQ must sequence these together; the indexer parses the group
    • This is the proof-account tx group — the required 5-6 tx sequence per mint/burn. This is NOT the same as transfer-splitting multi-tx (a single confidential transfer split across multiple txs because ZK proofs do not fit one tx) — that is an edge case deferred to the production scope doc.

Key details (validated on devnet)

  • confidential_supply on fresh mint = identity ciphertext (64 zero bytes), NOT encryptU64(0)
  • Record account is reusable across retries + closeable (closeAccount reclaims rent)
  • Context state accounts are one-shot + closeable (closeContextStateProof reclaims rent)
  • Proof gen inputs (supply key, auditor pubkey) come from KMS worker — SDK assembles instruction data, does NOT do proof crypto

Acceptance criteria

  • Confidential mint tx builder produces valid instruction sequence (create-record → write → verify × 3 → confidentialMint)
  • ConfigureConfidentialTransferAccount instruction builder
  • Proof-account tx group sequencing skeleton (5-6 txs per mint/burn as one SendQ logical unit)
  • Unit tests verify instruction data format matches expected Solana Token-2022 layout

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions