library / Blockchain ideas / Creator and membership / BI0152
Verified creator check
No. Each creator has its own verified flag in the mint's metadata account. One read of that account shows every flag and share, so you check when a mint is made or its metadata changes.
Who asks this
Launch teams ask this first. A mint writes the creators list into the metadata account, and each listed wallet has to sign before its flag turns on. After the drop, the question is whether those flags hold, and whether a marketplace or royalty tool can trust them without signing anything itself.
A royalty tool reads the list before it splits a sale, and holds a payout for review when a creator is still unverified. A support desk uses the same read to answer a buyer who asks why a name is missing from a collection page.
What the flag holds
The metadata account for a mint keeps a creators list. Each entry has an address, a royalty share in whole percent and a verified byte. The byte becomes 1 when that creator's wallet signs the instruction that marks it. The list sits inside the account, so one read covers every creator on the mint.
| Field | Where it sits | What it tells you |
|---|---|---|
| Creators list | after name, symbol and URI in the metadata account | every address the mint names |
| verified | one byte per creator | 1 when that creator's wallet signed |
| share | one byte per creator | that creator's percent of the royalty |
| Share total | sum of share across the list | 100 on a complete list |
The byte answers one question: did that wallet sign. It does not show that the creator should still receive royalties, because the update authority can change the metadata later. Read the flag together with the update authority when a payout depends on it.
The build
- Derive the metadata address for the mint from the Token Metadata program, the seed metadata, the program id and the mint.
- Read that account with getMultipleAccounts at confirmed commitment, base64 encoded, over https://services.carbium.sh with the key in the x-api-key header.
- Check that the owner is the Token Metadata program, then parse the Metaplex v1 layout: skip the key, update authority and mint, step past three strings and the fee, and read the creators list.
- Print each creator with its share and verified byte, the share total, and whether every creator has signed.
- With no mint argument, read the newest three signatures on the Token Metadata program, take the first transaction that holds a metadata account, and check that account against its own derived address.
// BI0152 · Verified creator check// https://carbium.sh/library/blockchainideas/verified-creator-check// Copyright (c) Carbium Corporation. MIT License (LICENSE). Keep this notice.// SPDX-License-Identifier: MITimport { createDefaultRpcTransport, createSolanaRpcFromTransport, getAddressDecoder, getAddressEncoder, getProgramDerivedAddress, getUtf8Encoder, type Address, type Signature } from '@solana/kit';const apiKey = process.env.CARBIUM_KEY;if (!apiKey) { console.error('CARBIUM_KEY is not set. Export your Carbium key and run again.'); process.exit(1);}const METADATA_PROGRAM = 'metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s' as Address;const endpoint = process.env.CARBIUM_RPC_URL ?? 'https://services.carbium.sh';const solana = createSolanaRpcFromTransport(createDefaultRpcTransport({ url: endpoint, headers: { 'x-api-key': apiKey } }));type Entry = { address: string; verified: boolean; share: number };type MetaRecord = { metadata: Address; mint: Address; entries: Entry[] };const toBytes = (payload: unknown): Uint8Array => payload instanceof Uint8Array ? payload : Buffer.from((payload as [string, string])[0], 'base64');// Metaplex Metadata v1: key, update authority, mint, three borsh strings, fee, then the creators option.function readLayout(bytes: Uint8Array): { mint: Address; entries: Entry[] } | null { if (bytes[0] !== 4) return null; const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); const mint = getAddressDecoder().decode(bytes.subarray(33, 65)); let cursor = 65; for (let field = 0; field < 3; field++) cursor += 4 + view.getUint32(cursor, true); cursor += 2; const entries: Entry[] = []; if (bytes[cursor] !== 1) return { mint, entries }; const count = view.getUint32(cursor + 1, true); cursor += 5; for (let idx = 0; idx < count; idx++, cursor += 34) { const address = getAddressDecoder().decode(bytes.subarray(cursor, cursor + 32)); entries.push({ address, verified: bytes[cursor + 32] === 1, share: bytes[cursor + 33] }); } return { mint, entries };}async function pdaFor(mint: Address): Promise<Address> { const [addr] = await getProgramDerivedAddress({ programAddress: METADATA_PROGRAM, seeds: [getUtf8Encoder().encode('metadata'), getAddressEncoder().encode(METADATA_PROGRAM), getAddressEncoder().encode(mint)] }); return addr;}async function fetchAccounts(addresses: Address[]) { return (await solana.getMultipleAccounts(addresses, { encoding: 'base64', commitment: 'confirmed' }).send()).value;}async function byMint(mint: Address): Promise<MetaRecord> { const metadata = await pdaFor(mint); const [acct] = await fetchAccounts([metadata]); if (!acct || acct.owner !== METADATA_PROGRAM) throw new Error(`no metadata account for mint ${mint}`); const layout = readLayout(toBytes(acct.data)); if (!layout) throw new Error('metadata account is not Metaplex v1'); return { metadata, ...layout };}async function byDiscovery(): Promise<MetaRecord> { const newest = await solana.getSignaturesForAddress(METADATA_PROGRAM, { limit: 3 }).send(); for (const row of newest) { const tx = await solana.getTransaction(row.signature as Signature, { encoding: 'json', commitment: 'confirmed', maxSupportedTransactionVersion: 1 }).send(); if (!tx) continue; const addrs = tx.transaction.message.accountKeys.slice(0, 100) as Address[]; const infos = await fetchAccounts(addrs); for (let pos = 0; pos < addrs.length; pos++) { const info = infos[pos]; if (!info || info.owner !== METADATA_PROGRAM) continue; const layout = readLayout(toBytes(info.data)); if (layout && (await pdaFor(layout.mint)) === addrs[pos]) return { metadata: addrs[pos], ...layout }; } } throw new Error('no metadata account in the newest three signatures; pass a mint');}try { const given = process.argv[2]; const rec = given ? await byMint(given as Address) : await byDiscovery(); const signed = rec.entries.filter((e) => e.verified).length; const total = rec.entries.reduce((acc, e) => acc + e.share, 0); console.log(`mint ${rec.mint}`); console.log(`metadata ${rec.metadata}`); for (const e of rec.entries) console.log(` ${e.address} share ${e.share}% ${e.verified ? 'verified' : 'UNVERIFIED'}`); console.log(`creators ${rec.entries.length}, verified ${signed}, share total ${total}%`); console.log(rec.entries.length > 0 && signed === rec.entries.length ? 'every creator is verified' : 'some creators have not signed');} catch (err) { console.error('check failed:', err instanceof Error ? err.message : err); process.exitCode = 1;}
run: CARBIUM_KEY=<YOUR_KEY> node main.ts [MINT]
The transaction read asks for version 1 because mainnet carries v1 transactions, and a call that leaves the setting at 0 or absent gets -32015 for a v1 transaction. A run with a mint argument skips discovery and checks that mint directly. Store the result by metadata address and read again when the metadata changes, since an update can rewrite the list and new entries start unverified.
What it costs
One mint check is one getMultipleAccounts call with one pubkey, at 10 cells. Discovery adds a getSignaturesForAddress call at 50 cells and a getTransaction call at 50 cells. The code sends at most 100 accounts in one call, which is the burst cap that applies below Pro: a 100-pubkey call costs 1,000 cells.
| Plan | getMultipleAccounts per second | getSignaturesForAddress per second | getTransaction per second |
|---|---|---|---|
| Free | 0.5 | 0.24 | 0.24 |
| Dev | 15 | 1.2 | 1.2 |
| Business | 50 | 100 | 5 |
| Pro | 400 | 500 | 25 |
A sweep over many mints is where these rates bind. At one account per mint, the account-read rate sets how many mints a second you can check, and a Free key gets half a read a second. Limits are per account, so other tools on the same key draw from the same budget.
Where it ends
- The check reads the state at the moment of the read. It cannot say why a flag was set or who set the update authority.
- Discovery looks at three signatures. A program with quiet metadata activity can return none, and the run then asks for a mint.
- Token-2022 mints keep metadata in the mint account, under the metadataPointer extension that names the mint first. This code reads only the Metaplex account, so those mints need their own parser.
- getSignaturesForAddress reaches back 30 days at most. Past that point an empty page shows the index's age limit, and says nothing about a mint's first transaction.
- Each run checks one mint. A collection of thousands needs a loop with a rate gate that follows the plan table above.
- A list read does not prove what was paid. Compare the shares with your own split.
When it goes wrong
| what goes wrong | what to do |
|---|---|
| The run says no metadata account for the mint. | The address is not a mint with Metaplex metadata, or it is a metadata address. Pass the mint itself. Token-2022 mints keep metadata in the mint, so this read finds nothing there. |
| getTransaction answers -32015 during discovery. | The call dropped maxSupportedTransactionVersion or left it at 0. Keep it at 1, as the code does. |
| Several runs in a minute stop with a 429. | Wait the retry-after seconds the response names, then run again. A Free key has half a read a second for account reads, so a loop needs a gap between mints. |
| The creators list is empty for a mint you know has creators. | The creators option is 0 in that account, so the mint has no list. Check the mint in an explorer and confirm which metadata address it points to. |
| The derived address does not match the account the transaction named. | That account is another type, such as a token account the transaction also touched. The code skips it. If no account matches, the transaction held no Metaplex metadata, and the run asks for a mint. |
Questions
Do I have to verify every creator again after each NFT is created?
No. A creator's flag is set when that creator signs during the mint and stays on the metadata account until the metadata changes. Read it once after the mint, and again only when the metadata changes.
Does a verified creator mean the royalty split is correct?
It means that wallet signed and its share is on the list. It does not confirm the split matches a deal made off chain, so compare the list with your own record.
Can this check a Token-2022 mint?
Not with this code. Token-2022 metadata sits in the mint account, and reading it needs the metadataPointer extension and a parser for that layout.
Why one read for the whole list instead of one call per creator?
The creators list lives inside the metadata account, so one read returns every flag and share. Per-creator calls would fetch the same bytes again.