services
Get a key

library / Use cases / Stablecoin treasury and B2B settlement / UC0147

Confidential transfer mint check

Find out whether a stablecoin mint on Solana can take confidential transfers at all. One account read returns each mint's owner program and extension list, and shows why the USDT address in the defaults is a classic SPL token with no such extension.

By Carbium · Stablecoin treasury and B2B settlement · UC0147 · updated 2026-11-23

01

Start from the mint address

USDT is a ticker, and a ticker does not say which program governs the token. On Solana a token is identified by its mint address, and the mint account names the program that owns it. Confidential transfers belong to Token-2022, the token program that adds optional extensions to a mint. An extension is set when the mint is created, so a mint that did not enable it at creation cannot gain it later.

The classic SPL Token program has no confidential transfer. For any stablecoin, the first question is which program owns its mint, and the second is which extensions that mint lists. The check below answers both from one account read.

Owner programWhat it means for a confidential transfer
Token-2022 with confidentialTransferMintThe mint can take confidential transfers once token accounts are configured.
Token-2022 without confidentialTransferMintTransfers on this mint stay public, whatever the other extensions say.
Classic SPL TokenThe mint has no confidential transfer extension.
02

What the extension needs before a transfer

Enabling the extension on a mint is only the first step. Each token account that sends or receives confidentially must be configured with its own ElGamal public key, and the owner holds the matching decryption key. The amount is encrypted for the account and for any auditor the mint names, so the ledger shows encrypted balances in place of plain amounts.

If autoApproveNewAccounts is false, the mint authority must approve each new account before that account can receive confidentially. If it is true, an account can configure itself without that step. Read this field before a payment run, because the authority can change it.

A transfer is a signed instruction, so it needs a sending wallet and code that builds it. The check does not build, sign or send one. What it gives you is the first gate: a read that says whether the mint is eligible at all, and what its approval setting is. Your treasury process decides the rest.

03

A read-only check in one call

The script sends one getMultipleAccounts call for every mint you name, with jsonParsed encoding, over the RPC endpoint under your key. The reply carries each account's owner program and, for Token-2022 mints, the list of extensions with their state. The call sets confirmed commitment explicitly, which is also the default that @solana/kit fills in when a call leaves it out.

The script prints the owner, the extension names it received, and the state of the confidential transfer extension. It exits with a message only when the key is missing or the call fails. Keep the key in CARBIUM_KEY. The script reads it from the environment and never prints it.

main.ts
// UC0147 · Confidential transfer mint check// https://carbium.sh/library/usecase/confidential-transfer-mint-check// Copyright (c) Carbium Corporation. MIT License (LICENSE). Keep this notice.// SPDX-License-Identifier: MITimport { address, createDefaultRpcTransport, createSolanaRpcFromTransport } from "@solana/kit";const apiKey = process.env.CARBIUM_KEY ?? "";if (apiKey === "") {  console.error("CARBIUM_KEY is not set. Export your Carbium key and run the check again.");  process.exit(1);}const endpoint = process.env.CARBIUM_RPC_URL ?? "https://services.carbium.sh";const TOKEN_2022_ID = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";const CLASSIC_ID = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";const LABELS = new Map<string, string>([  ["Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "USDT"],  ["2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo", "PYUSD"],]);const targets = process.argv.length > 2 ? process.argv.slice(2) : [...LABELS.keys()];type Extension = { extension?: string; state?: Record<string, unknown> };type MintAccount = { owner?: string; data?: { parsed?: { info?: { extensions?: Extension[] } } } };try {  const rpc = createSolanaRpcFromTransport(    createDefaultRpcTransport({ url: endpoint, headers: { "x-api-key": apiKey } }),  );  const addresses = targets.map((t) => address(t));  const reply = await rpc    .getMultipleAccounts(addresses, { encoding: "jsonParsed", commitment: "confirmed" })    .send();  const accounts: unknown = reply.value;  if (!Array.isArray(accounts)) throw new Error("unexpected reply shape");  targets.forEach((mint, idx) => {    const label = LABELS.get(mint) ?? mint;    const account = accounts[idx] as MintAccount | null;    if (!account) { console.log(`${label}: no account found`); return; }    const owner = account.owner ?? "unknown";    if (owner !== TOKEN_2022_ID) {      const name = owner === CLASSIC_ID ? "classic SPL Token" : owner;      console.log(`${label}: owned by ${name}`);      console.log("  confidential transfers: not on this mint");      return;    }    const extensions = account.data?.parsed?.info?.extensions ?? [];    const names = extensions.map((ext) => ext.extension ?? "unknown");    console.log(`${label}: Token-2022, extensions: ${names.join(", ") || "none"}`);    const ct = extensions.find((ext) => ext.extension?.toLowerCase() === "confidentialtransfermint");    console.log(ct      ? `  confidential transfer mint: yes, autoApproveNewAccounts=${String(ct.state?.autoApproveNewAccounts)}`      : "  confidential transfer mint: no");  });} catch (e) {  console.error("check failed:", e instanceof Error ? e.message : e);  process.exit(1);}

run: CARBIUM_KEY=$CARBIUM_KEY node main.ts Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB 2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo

With no arguments the script checks USDT and PYUSD. Pass your own mint addresses to check others, one per argument. Both defaults are read the same way, so the output shows the program each one actually belongs to.

04

Reading the result

  • Owner is the classic token program: stop here. The mint cannot take confidential transfers, and no account setting changes that.
  • Owner is Token-2022 and the extension list has no confidentialTransferMint: transfers on this mint are public.
  • Owner is Token-2022 with confidentialTransferMint and autoApproveNewAccounts is true: the mint is eligible, and each token account still needs its own configuration.
  • autoApproveNewAccounts is false: the mint authority approves each new account, so find out who holds that authority before you plan on it.
  • No account comes back for an address: it is not a mint on this chain, or the account was closed. Check the address before you check the program.
05

What one check costs

getMultipleAccounts is an account read, priced at 10 cells per pubkey. A check of two mints is 20 cells in one request. The call takes up to 300 pubkeys on Pro and up to 100 on lower plans, and a check of a few mints stays far under either limit. Limits are per account, so every key on the account draws from one budget.

On Free, account reads run at 0.5 requests per second, so a loop over a long list of mints needs spacing. A call over its rate waits once, and if the cells do not refill in time it gets 429 with a retry-after hint. Batching the mints into one call keeps the request count low and the cell count the same.

Extension lists are set at creation and seldom change, so cache them. Re-read the state fields of an eligible mint before a payment run, because the approval setting can change under the mint authority.

06

Where it ends

  • This is a read. The script signs nothing, sends nothing and holds no wallet, so it cannot make a confidential transfer. Building one needs an ElGamal setup for each token account and a signed instruction in your own code.
  • The check reads the mint's extensions and no token account. An account can be unconfigured on an eligible mint, and it will then refuse a confidential receive.
  • A confirmed answer for one mint says nothing about another mint, and neither answer says whether any account holds a balance.
  • The extension name is matched as the RPC returns it. If a name changes, the output shows the names received, and the comparison in the script needs one line of update.
  • Confidential state is read from the mint only. Confirming that a transfer already landed is a separate read of the transaction, outside this check.
07

When it goes wrong

what goes wrongwhat to do
The check says the mint has no confidential extension, so the plan is dropped.Check the mint address your issuer publishes for the Token-2022 version of the token. Run the check on that address, not on a ticker.
Every mint comes back with no account, and the call looks empty.Confirm each address is a mint on this chain and that the key is attached. An unknown key gets 401 at the door, so attach the whole key and check CARBIUM_RPC_URL.
A loop over many mints on a Free key gets 429.Free account reads run at 0.5 requests per second. Batch the mints into one call, or space the calls, or move to a plan with a higher account-read rate.
The run stops before any request with an invalid address error.Pass base58 mint addresses only. The script converts each argument with address(), so a typo stops the run before the request is sent.
An extension is present but not marked as the confidential one.Read the names the output prints, match the name the RPC returns, and update the one comparison in the script.
08

Questions

Can I send USDT confidentially on Solana?

Only on a mint that has the confidential transfer extension. The USDT address in the defaults is a classic SPL mint without it, so the check shows which mint you hold. Building the transfer is a separate job in your own code.

Does the check prove I can transfer confidentially now?

No. It shows that the mint is eligible and how its approval setting is configured. Each token account still needs its own configuration before it can send or receive.

Why one getMultipleAccounts call instead of one call per mint?

One call returns every mint in one request, and it costs the same 10 cells per pubkey as separate calls. On a Free key the request rate is the tighter limit, so one request is the better choice.