ar.io Logoar.io Documentation
Testnet Sandbox

ArNS Names

The sandbox runs a devnet ArNS registry. You can buy real names paid in staging-ARIO credits and resolve them at https://<name>.ar-io.dev. New to ArNS? Start with the ArNS overview.

There are two ways to register: the bundler route (simplest — pay with your Turbo credits), or directly with the ar.io SDK against the devnet programs.

Buying through the bundler

Buying through the bundler debits your upload credits, and (like mainnet) Turbo takes custody of nothing — the ANT (Metaplex Core asset) backing the name is minted straight to a Solana key you control. Use the Turbo SDK rather than hand-rolling the raw HTTP calls: buying needs your owner key to sign the ANT-creation transaction Turbo prepares, and the SDK drives that signature exchange for you.

import { HexSolanaSigner, solanaOwnerSigner, TurboFactory } from '@ardrive/turbo-sdk';
import bs58 from 'bs58';

const secretKeyBase58 = bs58.encode(secretKey); // your devnet Solana keypair

const turbo = TurboFactory.authenticated({
  signer: new HexSolanaSigner(secretKeyBase58), // the payer — spends your upload credits
  token: 'solana',
  paymentServiceConfig: { url: 'https://payment.services.ar-io.dev' },
});

// The owner can be the same wallet as the payer, or a different one you control.
const owner = solanaOwnerSigner(secretKeyBase58);

const { antId, messageId } = await turbo.buyArNSName({
  name: '<name>',
  owner,
  type: 'lease', // or 'permabuy'
  years: 1, // leases only
});

Check the price first with turbo.getArNSPriceForName({ intent: 'Buy-Name', name, type: 'lease', years: 1 }), or hit the same route directly:

GET https://payment.services.ar-io.dev/v1/arns/price/buy-name/<name>?type=lease&years=1

Minimum name length: 8 characters — bundler route only. This is an anti-squat rule on the shared registry; shorter names return 400 (Name must be at least 8 characters…). Buying directly with the SDK is not subject to this floor.

Advanced: buying directly with the SDK

You can also buy and manage names directly against the devnet programs — paying the name price in staging ARIO and devnet SOL yourself — instead of going through the bundler proxy. This path is not bound by the bundler's 8-character floor (though very short or premium names may still be reserved on-chain).

import { ARIO } from '@ar.io/sdk';

const ario = ARIO.init({
  backend: 'solana',
  programIds: DEVNET_PROGRAM_IDS, // see Reference
  rpc,
  signer,
});

const cost = await ario.getTokenCost({ /* name, type, years */ });
await ario.buyRecord({ /* name, type, years */ });

The payment mint is read from on-chain config automatically (the staging ARIO mint). For the devnet program IDs and the ar.io SDK's devnet configuration, see the Reference and the SDK's advanced networks and networks guides.

Resolving a name

Once bought, https://<name>.ar-io.dev resolves the record, returning x-arns-* response headers. To point a name at your uploaded data, set its record with turbo.setArNSRecord({ antId, owner, transactionId, undername, ttlSeconds }) (same sponsored, credits-charged bundler route as buying — see managing an ANT), or through your ANT directly with the ar.io SDK.

Names outlive data. A name keeps resolving because the record lives on the devnet registry — but the data behind it disappears after the ~3-day purge. Re-upload and re-point when you need it back.

See Accessing Data for the full set of ArNS resolution headers.

Next steps

How is this guide?