Introducing a new way to review your PRs.

Read the announcement

solana-foundation / explorer

Explorer for Solana clusters

View on GitHub

23 documents · Updated Nov 23, 2026

docs / domains-programs-and-security

Domains, programs, and security identity

This page explains how the explorer turns Solana addresses into useful identity signals. It covers domain names, program metadata, interface description language (IDL) data, verified builds, and security contact data. These signals support address pages, transaction views, search, program interaction, and machine-readable entity inspection.

For the wider identity model, see Discovery and identity. For search use, see Search and routing.

Domain identity

Domain resolution

The domain resolver maps a human-readable name to its name account and current owner. It accepts .sol names from the Solana Name Service (SNS) and other supported names from AllDomains Name Service (ANS). Input is case-normalized before the lookup. A missing account, invalid record, or expired ANS record produces no resolved identity instead of an untrusted result.

The /api/domain-info/[domain] endpoint is the single request path for this lookup. It validates the domain shape, reads the relevant on-chain record on mainnet, and caches successful results for later page views. A valid name that has no record returns a cacheable empty result. Invalid input and lookup failures are not cached.

The resolution path selects the name system from the suffix and then checks the matching on-chain record.

flowchart TD
    A[Domain name] --> B[Lowercase and validate]
    B --> C{Suffix}
    C -->|SNS suffix| D[SNS name record]
    C -->|.sol| E[No result]
    C -->|Other supported suffix| F[ANS name record]
    D --> G[Name account and owner]
    F --> G
    G --> H[Domain identity response]

References: app/…/resolve-domain.ts• L12-44 app/…/sns-name-service.ts• L20-31 app/…/ans-name-service.ts• L77-101 app/…/route.ts• L13-35 app/…/route.spec.ts• L18-81

Wallet domain lists

The wallet domain view combines all names owned by an address into one sorted list. SNS names come from the Bonfida domain service and are mapped to their SNS name accounts. ANS names are found from on-chain owner records and reverse records, so the list can include names from multiple ANS top-level domains without resolving each suffix one by one.

The explorer exposes these sources separately through /api/sns-domains/[address] and /api/ans-domains/[address]. The domain card requests both sources in parallel and reports one combined result. The ANS lookup reads the wallet's records in one pass, maps each record to a validated top-level domain, and batches reverse-name reads when needed. It omits malformed, spoofed, empty, or expired records. The API accepts only a valid wallet address, returns a cacheable list when the lookup succeeds, and keeps RPC failures out of the cache so a later request can retry.

References: app/…/fetch-sns-domains.ts• L7-26 app/…/fetch-ans-domains.ts• L51-67 app/…/fetch-ans-domains.ts• L90-163 app/…/route.ts• L7-36 app/…/route.ts• L15-33 app/…/use-user-sns-domains.ts• L9-27 app/…/use-user-ans-domains.ts• L9-28 app/…/DomainsCard.tsx• L11-32

Program metadata

IDL discovery

An IDL, or interface description language document, describes a program's instructions, accounts, types, and program name. The explorer looks for two on-chain IDL sources: an Anchor IDL account and the Program Metadata (PMP) idl record. It keeps both sources available so each product surface can use the source that best fits its job.

The inspector also treats known built-in and utility programs as programs without an Anchor IDL. It skips their derived-account lookup because an expected absence can otherwise become a transient RPC failure whenever a transaction uses one of these programs.

Known clusters use /api/idl-latest; custom and local clusters resolve against the RPC URL supplied by the user. Both paths use the same source order and return absent sources separately from RPC failures. An absent source means that no metadata was published. Corrupt account data or invalid IDL content is an error, while a payload failure remains retryable instead of becoming an empty result.

flowchart LR
    A[Program address and cluster] --> B{Cluster access}
    B -->|Known cluster| C[/api/idl-latest]
    B -->|Custom or local| D[User RPC]
    C --> E[Anchor IDL and PMP IDL]
    D --> E
    E --> F[Program name, IDL view, and decode support]

References: app/…/resolve-program-idls.ts• L11-31 app/…/resolve-program-idls.ts• L41-75 app/…/use-program-idls.ts• L14-72 app/…/route.ts• L37-95 packages/…/programs-without-anchor-idl.ts• L19-48 packages/…/solana-idl.ts• L9-67

IDL identity and use

The IDL view shows the source account, source family, program name, and program version when those values exist. It supports Anchor and Codama IDLs. Older Anchor documents are treated as legacy data, while modern Anchor and Codama documents expose their own format labels and program version fields. The view presents one IDL at a time: it prefers the PMP IDL when available and uses the Anchor IDL as a marked fallback. It does not present the two sources as competing tabs.

The source label identifies the publication path—Anchor or PMP—not the IDL format. A PMP publication can still carry an Anchor-format IDL. IDL data gives the explorer a shared vocabulary for instruction and account data. It can replace unknown program or instruction labels in transaction views and can support structured decoding. The displayed IDL must identify the program being viewed. When its program address does not match, the explorer hides the content to prevent interaction.

References: packages/…/solana-idl.ts• L9-20 app/…/types.ts• L9-18 app/…/idl-version.ts• L19-92 app/…/IdlCard.tsx• L124-213 app/…/IdlCard.tsx• L244-269 app/…/IdlCard.spec.tsx• L132-275 app/…/index.ts• L17-30

IDL exploration and interaction

The IDL surface turns published program metadata into a searchable guide and a guarded interaction path. Engineers can find instructions, accounts, types, errors, events, constants, and PDAs. They can then use an instruction form to supply arguments and accounts.

The interaction path supports both Anchor and Codama standards through one user-facing model. It derives PDA values from the form when the IDL defines enough seed data, prefills known account values, and leaves unresolved values for the user to enter. The form supports scalar, optional, vector, and fixed-array values while keeping input errors visible before an action is sent. Because instruction names come from untrusted on-chain IDL data, form setup treats those names as data and does not write defaults onto shared object properties.

When an engineer chooses an action, the explorer can simulate the instruction first or send it through a connected wallet. The cluster selector shows the active network and warns when it uses Mainnet, where actions use real funds. Mainnet actions require a one-time disclaimer unless the user already accepted it. Non-mainnet actions run without that disclaimer. Simulation and execution keep local build failures, RPC failures, and confirmed chain errors separate, and show logs or an inspector link when a serialized message exists.

This diagram shows how an IDL moves from discovery to a safe instruction result.

flowchart LR
    A[Published IDL] --> B[Searchable program view]
    B --> C[Instruction form]
    C --> D[Arguments and accounts]
    D --> E[PDA and known-value prefills]
    E --> F{Action}
    F -->|Simulate| G[Simulation logs and result]
    F -->|Execute| H[Mainnet confirmation if needed]
    H --> I[Wallet sign and broadcast]
    I --> J[Transaction result and logs]

References: app/…/search.ts• L5-62 app/…/InteractInstruction.tsx• L40-80 app/…/ClusterSelector.tsx• L9-25 app/…/BaseClusterSelector.tsx• L22-52 app/…/compute-pdas.ts• L15-42 app/…/use-form-prefill.ts• L10-35 app/…/use-simulate-transaction.ts• L25-90 app/…/use-execute-transaction.ts• L44-111 app/…/use-mainnet-confirmation.ts• L21-61 app/…/use-instruction-form.ts• L28-125 app/…/use-instruction-form.spec.ts• L9-33

Program name metadata

The program name label prefers the PMP IDL when one is available because PMP is the shared metadata path for program identity. If PMP has no usable IDL, the label falls back to the Anchor IDL and then to the caller's default name. This keeps a useful name visible without treating a fallback source as equivalent to the preferred metadata source.

References: app/…/program-name.tsx• L11-45 app/…/use-program-metadata-idl.tsx• L1-15 app/…/use-program-idls.ts• L14-24

Program Metadata accounts

Program Metadata accounts are machine-readable entities that describe a program or its published data. The inspector exposes their base account identity and adds header fields when the account provides them. These fields can include the related program, authority, mutability, data source, encoding, format, and canonical status.

The account remains a recognized Program Metadata entity when it has no header or when its header cannot be decoded. This preserves a useful account identity without treating incomplete metadata as valid detailed data.

References: packages/…/program-metadata.ts• L22-29 packages/…/program-metadata.ts• L31-77

Program trust

Verified builds

A verified build is a claim that a deployed program matches compiled source code identified by a repository and commit. The explorer reads verification records from the OSEC registry and checks the record against the current program data hash before it presents the program as verified.

Trust depends on who signed the claim and whether the program can still change. A mutable program needs a matching claim from its upgrade authority or a trusted signer. An immutable program can use a verified frozen-program claim or a trusted signer. The result includes evidence such as the signer, hashes, time, and source location.

The registry is available for mainnet and devnet. The local verified-program search snapshot is mainnet-only, so search coverage is narrower than the live verification capability. The verified-build view can also show a repository URL and verify command when matching on-chain build metadata is available.

References: packages/…/verification.ts• L12-20 packages/…/verification.ts• L68-117 packages/…/verification-core.ts• L9-32 app/…/verified-builds.tsx• L20-40 app/…/verified-builds.tsx• L140-165 app/…/verified-builds.tsx• L367-425

Verified program search is a discovery aid, not the verification decision itself. It searches a daily-built mainnet snapshot by program name or address and links a match to the verified-build view. The live page still checks the current registry record and deployed bytes before it presents verified status.

References: app/…/verified-programs-search-provider.ts• L9-25 app/…/verified-programs-search-provider.ts• L26-57 public/verified-programs.json• L1-12

Token attestation

Token attestation is a separate verification signal for a token mint. The Bluprynt API checks for a matching on-chain attestation on mainnet and returns whether one exists. The token verification feature keeps a missing attestation distinct from a request failure or rate limit. This signal does not verify a program build and must not be read as the same claim.

The check accepts a mint address and searches the configured Bluprynt credential across its supported schema versions. A slow RPC request returns a timeout error instead of a false verification result, so the client can show that the source failed rather than claim that no attestation exists.

References: app/…/route.ts• L11-15 app/…/route.ts• L36-83 app/…/use-bluprynt.ts• L13-71 app/…/use-verification-sources.ts• L14-45

Security identity

Security.txt metadata

security.txt is self-reported program contact and project metadata. It gives users a way to find the project name, project URL, security policy, contact channel, and optional source, audit, language, encryption, and expiry details. The explorer displays the data but warns that the program author supplied it and that it is not proof of safety. The card also lets a user download the displayed data as JSON and marks whether the source is the canonical PMP record or the legacy Neodyme format.

The preferred source is the canonical PMP security record. If that record is absent, the resolver checks the legacy Neodyme security section embedded in the program binary. An invalid record is not presented as valid metadata. An expiry date is surfaced as an expired status when the value can be parsed. The card renders links, contacts, keys, lists, and other values according to their data type, while invalid display data is contained instead of breaking the surrounding program view.

Known clusters use /api/security-txt; custom and local clusters read through the user's RPC. The endpoint requires a supported cluster and program address. It returns a cacheable empty result when no security data exists, but it returns an uncached retryable error when the RPC fails.

References: packages/…/pmp-security.ts• L9-37 packages/…/security.ts• L21-47 packages/…/security.ts• L50-119 app/…/route.ts• L16-70 app/…/useSecurityTxt.ts• L13-52 app/…/SecurityCard.tsx• L22-85 app/…/SecurityCard.tsx• L180-287

Program identity enrichment

Machine-readable program inspection combines IDL discovery, build verification, security metadata, and multisig references as separate enrichments. Each enrichment can be found, missing, or unknown because its source failed or its data was invalid. This separation lets a program retain a useful base identity when one external or on-chain source is unavailable.

The inspector resolves these program signals in parallel for upgradeable programs. IDL discovery can also decode an otherwise unknown account through the owner program's IDL, while verification and security metadata remain independent evidence about the program and its operator.

References: packages/…/types.ts• L9-43 packages/…/inspect-entity.ts• L185-237 packages/…/inspect-entity.ts• L240-265

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the domain suffix choice, record decoder, and domain API response aligned. A change in one can turn valid names into empty results or map a name to the wrong owner.
  • Keep wallet address validation and ANS lookup failure handling aligned. Invalid input should be a client error, while an RPC failure must not become a cacheable empty domain list.
  • Keep ANS TLD-house validation and reverse-record derivation aligned. A spoofed TLD account or a wrong name class can attach a valid-looking name to the wrong domain.
  • Keep Anchor and PMP IDL source names aligned across the resolver, /api/idl-latest, and all consumers. Missing sources must remain distinct from RPC errors.
  • Keep the no-Anchor-IDL program set aligned with every IDL caller. Known built-in programs must not create repeated lookup failures.
  • Preserve the program-address check before displaying or using an IDL. A valid document for a different program is still unsafe for the current page.
  • Keep publication source separate from document format. A PMP publication can carry an Anchor-format document and must still use PMP source identity.
  • Keep IDL standard detection aligned with the instruction builder and PDA provider. Anchor and Codama documents must reach the matching interaction path.
  • Keep instruction-form default creation safe for untrusted instruction names. Names such as __proto__ and constructor must not write to shared objects.
  • Keep argument and account normalization aligned with IDL types. Missing seeds should remain visible as unresolved values rather than becoming false PDA addresses.
  • Keep simulation and execution result phases aligned with their UI links. Only a broadcast transaction has a chain signature, while a local failure can have only an inspector message.
  • Keep the cluster selector warning and the mainnet disclaimer aligned with the active cluster. Mainnet actions need acknowledgment, while non-mainnet actions should not be blocked by the Mainnet cookie.
  • Keep verification hash checks tied to the current deployed program data and the correct cluster registry. A registry claim without a current hash match must not become verified status.
  • Keep token attestation status separate from program build verification. A Bluprynt timeout or missing attestation must not be converted into a verified or unverified program claim.
  • Keep PMP security metadata ahead of the embedded legacy source. Changing precedence can silently replace canonical data with older self-reported data.
  • Keep custom and local security lookups on the user's RPC while known clusters use the server route. Do not send a user-supplied custom RPC URL to the server API.
  • Keep the security card's source badge, download data, and field rendering aligned with the resolved security format. A new source or field shape must not lose the warning that the data is self-reported or render invalid values as trusted content.
  • Keep search snapshot scope separate from live verification scope. A mainnet-only search result list must not imply that devnet verification is unavailable.

Important failure modes

TriggerConsequenceGuard
Mixed-case or malformed domain inputThe name lookup can target the wrong derived account or accept a non-domain valueNormalize names before lookup and reject invalid labels at the API boundary
Expired ANS record past its grace periodA stale ANS owner could appear to control the nameTreat the record as invalid and omit its owner
TLD house is not at its canonical addressA spoofed TLD can attach a name to an attacker-controlled domain systemVerify the declared TLD against its canonical derived address
Invalid wallet address on the ANS list routeThe route could perform a lookup for invalid input or return an unclear upstream errorValidate the address before fetching domains
ANS RPC failure returned as an empty listA temporary outage can be cached as if the wallet has no ANS namesReturn an error with no-store caching and allow a later request to retry
Known no-Anchor-IDL program sent through the Anchor lookupAn expected absence can become a transient failure on every related transactionSkip the lookup for the maintained behavioral set
IDL address does not match the viewed programThe page could show or use instructions from an unrelated programHide the IDL and report the mismatch
Publication source is treated as IDL formatConsumers can display the wrong format or select the wrong interpretationKeep Anchor/PMP source identity separate from Anchor/Codama format identity
Instruction name is __proto__ or constructorForm setup can write argument defaults onto shared objects and alter later behaviorCreate instruction buckets only after an own-property check
PDA seed is missing or cannot be convertedThe form can show an address that does not match the instructionKeep the PDA unresolved and preserve seed information for correction
Instruction builder receives an unknown name or invalid valueThe action stops before an unsafe or malformed instruction is builtMatch the instruction to the IDL and report conversion errors before RPC use
Mainnet action skips required confirmationA wallet can sign a live-network action without the intended user acknowledgmentGate first-time Mainnet execution and persist only an explicit acceptance
RPC simulation or execution fails after local buildThe user can confuse a local error with a chain resultTrack local, simulation, and broadcast phases separately and keep logs with the matching phase
OSEC hash differs from the current program dataOld source code could be presented as the current verified buildRecompute the deployed-data hash before selecting a verified entry
Bluprynt attestation RPC times outThe token can appear unverified even though the source did not answerReturn a timeout status and keep it separate from a confirmed missing attestation
RPC failure is returned as an empty IDL or security resultA transient outage can be cached as permanent missing metadataReturn an error and let the caller retry; cache only valid absence
Invalid or incomplete security.txt fieldsUsers could see malformed contact or policy data as trusted metadataRequire the core fields and mark invalid content as unknown
Security data has an unsupported or malformed display valueA program page can fail while showing a link, contact, list, or keyKeep value rendering type-aware and contain invalid card content with an error boundary
Program Metadata header cannot be decodedA valid metadata account could disappear from entity inspectionKeep the base account fields and omit only the detailed header fields

Key files

FileWhy to read it
app/…/resolve-domain.tsDefines the single-name resolution contract for SNS and ANS.
app/…/fetch-ans-domains.tsShows how wallet-owned ANS names are collected across top-level domains and checked for valid TLD records.
app/…/route.tsShows the public API boundary and cache policy for name resolution.
app/…/route.spec.tsShows the expected distinction between valid absence, invalid input, and lookup failure.
app/…/route.tsShows ANS wallet-list validation and the distinction between cached success and uncached RPC failure.
app/…/resolve-program-idls.tsDefines the shared Anchor and PMP IDL discovery model.
app/…/route.tsShows the known-cluster IDL API and its failure policy.
packages/…/solana-idl.tsNormalizes IDL publication sources and missing or invalid results for callers.
packages/…/programs-without-anchor-idl.tsDefines the programs for which Anchor IDL discovery is not expected.
app/…/IdlCard.tsxShows source preference, metadata display, mismatch protection, and links to IDL tooling.
app/…/search.tsShows the searchable view across the main IDL entity types.
app/…/InteractInstruction.tsxShows the user path from IDL fields to simulation or execution.
app/…/ClusterSelector.tsxShows how the active cluster and Mainnet warning reach the interaction surface.
app/…/use-instruction-form.tsDefines instruction form defaults, validation, and the conversion of nested fields into call parameters.
app/…/use-instruction-form.spec.tsProtects form setup from prototype-property instruction names and checks nested field flattening.
app/…/compute-pdas.tsShows how IDL-specific PDA providers support instruction forms.
app/…/use-simulate-transaction.tsDefines simulation results, logs, and failure phases.
app/…/use-execute-transaction.tsDefines wallet execution, confirmation, and broadcast result phases.
app/…/use-mainnet-confirmation.tsDefines the Mainnet acknowledgment boundary for live actions.
packages/…/program-metadata.tsDefines the machine-readable identity for Program Metadata accounts.
packages/…/verification.tsDefines live verified-build evidence and winner selection.
app/…/verified-builds.tsxConnects verification evidence to the explorer's verified-build view.
app/…/route.tsDefines the mainnet token-attestation API and its timeout behavior.
app/…/use-bluprynt.tsMaps Bluprynt API results into distinct loading, missing, rate-limit, and failure states.
packages/…/security.tsDefines security metadata precedence and validity states.
app/…/route.tsShows the public security metadata API, cluster validation, and source behavior.
app/…/useSecurityTxt.tsShows how known, custom, and local clusters select their security metadata path.
app/…/SecurityCard.tsxShows how security metadata is labeled, warned about, rendered, and downloaded.
packages/…/types.tsDefines the machine-readable contracts for IDL, verification, and security enrichments.