Integration guide
Start by deciding what your application needs: display a name, verify its holder, submit a registration, or collect a name-targeted payment. These operations require different evidence and wallet capabilities.
Use a reviewed release and its exact artifacts rather than copying note layouts from historical documentation. The application source is currently access-controlled; see Source access for implementation packages and detailed specifications.
1. Bind the network and deployment
Choose the Mainnet or Testnet deployment, then bind:
- Network identity and genesis commitment.
- Domain faucet account and creation block.
- Artifact manifest and allowed note-root digests.
- Exact payment-token issuer, decimals, stored price schedule, and fee asset.
- Wallet capabilities needed by the intended operation.
The frontend loads /config.json with cache: no-store, strictly validates schema 3, and freezes the resulting configuration before use. A configuration failure blocks initialization rather than silently selecting SDK defaults.
Use the complete Mainnet or Testnet file as a reference. The current shape includes paymentTokens, registrationPricesUsd, features, services, and the domainFaucetAccountId deployment field. The old single-token schema and registry-account fields are obsolete.
These files are public declarations. Authenticate the live account and configuration before enabling financial actions. Do not reuse browser recovery state across a network, issuer, genesis, or release change.
2. Decode and authenticate a name asset
The workspace package @midenname/domain-nfa-codec provides a dependency-free codec and test vectors. The import below assumes that package has been included in your project; it is not a statement that a particular npm release has been published.
import { decodeDomainNfaAsset } from '@midenname/domain-nfa-codec';
// Supply logical bigint limbs from an authenticated vault asset.
// Obtain trusted issuer limbs from the selected deployment via the SDK.
const label = decodeDomainNfaAsset(assetIdFelts, valueFelts, {
prefix: trustedIssuerPrefix,
suffix: trustedIssuerSuffix,
});
const displayName = `${label}.miden`;
All limbs must be bigint. Value-only decoding is useful for previews but does not authenticate the issuer. Full asset decoding validates all ID and value limbs, including version and reserved fields. Decoding alone does not prove current custody; the asset must come from the account state you are authenticating.
The codec accepts only a canonical 1–21 character lowercase alphanumeric label. It does not trim whitespace, lowercase input, or remove .miden. Perform user-input normalization separately, then validate.
The asset's readable base-37 value is also distinct from the canonical four-felt registration input word. Use the corresponding builders rather than substituting one representation for the other. See Ownership and transfers for the current asset layout.
3. Respect account capabilities
A public account can expose its vault for authenticated enumeration. A private account needs wallet participation, and the current Bread dApp adapter does not expose private domain enumeration. Do not show an empty list as proof that the user owns no names.
V1 name payments use existing BasicWallet procedures and a later domain-return collection. V2 requires the exact DomainOwnership procedure root and initial-vault custody. Detect the real interface rather than treating wallet brand or a successful connection as sufficient support.
4. Submit registrations safely
Read the live stored price schedule and token metadata. Construct an exact-payment request with the matching pricing commitments, trusted target, canonical name, and sender-reclaim height. Use checked integer arithmetic for all amounts; convert to decimal text only for display.
The displayed USD tiers explain pricing, but they are not a substitute for the current on-chain payment schedule. A price revision or expired refresh can invalidate a previously prepared request. Re-read and present a changed quote before asking the user to approve it.
Persist the exact request note, reclaim height, and relevant identity before approval. Record wallet handles as soon as they are returned. An uncertain submission must be reconciled under its original identity, not replaced by a second payment.
Show payment submission, service settlement, and buyer collection as separate stages. Complete registration only after verifying collection of the expected delivery. Preserve the unprocessed-request reclaim and refund-collection path.
5. Integrate payment discovery and collection
Use the versioned p2nV1, p2neV1, p2nV2, or p2neV2 script declared by the manifest. The current builders default to V1. Both P2NE versions commit the issuer and fallback in immutable note storage; do not infer them from a discovery tag.
For every candidate, authenticate inclusion and validate script, issuer, storage, assets, and recipient policy. Public scans must report incomplete progress explicitly. A spent hint is not sufficient to confirm collection by the expected account.
V1 holder collection has two approvals: consume the payment, then collect the public return containing the name and one fungible base unit. V2 and fallback collection have different custody requirements. Follow the payment lifecycle and the specification distributed with the exact release package.
6. Keep frontend and contract versions aligned
The current release uses protocol 0.17.1 artifacts on compatible node 0.18.0, runtime configuration schema 3, artifact schema 10, and domain codec 1. These version numbers describe different things.
Mainnet and Testnet have separate manifest bindings even when their executable packages match. Do not disable release checks to make a different account work. Review upgrade authority and network submission limits before promising in-place changes.
Source access
The application and documentation repositories are currently private. For integration work, contact the Miden Name community to request the reviewed codec, test vectors, compiled note packages, and release specifications. Do not use an unrelated package with a similar name.
Developers who already have permission can use the application repository. Relevant paths are:
frontend/src/config/runtimeConfig.ts: runtime validation.packages/domain-nfa-codec/: codec, TypeScript declarations, and vectors.contracts/docs/domain-nfa-encoding.md: strict encoding specification.docs/name-payments-v1-v2.md: note layouts, settlement, and collection verification.docs/domain-faucet-upgrades.md: operator runbook and recovery rules.
Public readers can use the deployment, ownership, payment, and security pages in this documentation without repository access.