Skip to main content

Prerequisites

  • CLI setup with keys and RPC endpoint configured
  • Registry payment token mint and treasurer token account ready
  • Fee payer funded for signer costs

Command Overview

Initialize Registry

Create the .thru registry config and root registrar

Purchase Domain

Buy a new .thru domain and create its lease

Renew Lease

Extend an existing domain lease

Claim Expired Domain

Reclaim domains whose leases have expired

Initialize Registry

Create the .thru registry and price configuration. The CLI derives the config account (seed config) and validates the token mint/treasurer accounts against the provided token program, including requiring the treasurer token account to be active (not frozen).
thru-cli registrar initialize-registry \
  $root_registrar_account \
  $treasurer_account \
  $token_mint_account \
  $price_per_year \
  [root_domain_name] \
  [OPTIONS]
root_registrar_account
string
required
Root registrar address for the base name service program (must not yet exist)
treasurer_account
string
required
Token account that receives payments; must use the registry mint, match the token program, and be active (not frozen)
token_mint_account
string
required
Registry payment token mint address
price_per_year
u64
required
Price in base units per year of registration as an unsigned 64-bit integer (applied to purchases and renewals)
root_domain_name
string
Optional root name stored in the registry config (default: thru, max 64 characters)
--name-service-program
string
Override base name service program address
--token-program
string
Override token program address
--config-proof
string
Hex state proof for the config account; auto-generated if omitted
--registrar-proof
string
Hex state proof for the root registrar account; auto-generated if omitted
--fee-payer
string
default:"default"
Signer paying transaction costs
--thru-registrar-program
string
Override the thru registrar program address
Example:
thru-cli registrar initialize-registry \
  ta...[root_registrar_account] \
  ta...[treasurer_account] \
  ta...[token_mint_account] \
  10_000_000 \
  --token-program ta...[token_program]

Purchase Domain

Buy a .thru domain for a number of years. The CLI derives the lease account from the domain name and validates your payer token account before submitting.
thru-cli registrar purchase-domain \
  $domain_name \
  $years \
  $config_account \
  $payer_token_account \
  [OPTIONS]
domain_name
string
required
Domain segment without .thru (1-64 characters)
years
u8
required
Lease term in years as an unsigned 8-bit integer (valid range: 1-255)
config_account
string
required
Initialized registry config account address
payer_token_account
string
required
Token account for the registry mint owned by the fee payer
--lease-proof
string
Hex state proof for the lease account; auto-generated if omitted
--domain-proof
string
Hex state proof for the domain account; auto-generated if omitted
--fee-payer
string
default:"default"
Signer for the transaction
--thru-registrar-program
string
Override the thru registrar program address
Example:
thru-cli registrar purchase-domain \
  example \
  2 \
  ta...[config_account] \
  ta...[payer_token_account]
The treasurer and payer token accounts must use the registry mint and token program, and the payer token account must be owned by the fee payer; otherwise the CLI rejects the transaction.

Renew Lease

Extend a domain’s lease using the same registry mint and treasurer validation as purchases.
thru-cli registrar renew-lease \
  $lease_account \
  $years \
  $config_account \
  $payer_token_account \
  [OPTIONS]
lease_account
string
required
Existing lease account address for the domain
years
u8
required
Additional years to add as an unsigned 8-bit integer (valid range: 1-255)
config_account
string
required
Registry config account address
payer_token_account
string
required
Registry mint token account owned by the fee payer
--fee-payer
string
default:"default"
Signer for the transaction
--thru-registrar-program
string
Override the thru registrar program address
Example:
thru-cli registrar renew-lease \
  ta...[lease_account] \
  1 \
  ta...[config_account] \
  ta...[payer_token_account]

Claim Expired Domain

Reclaim a domain whose lease has expired by paying for a new term.
thru-cli registrar claim-expired-domain \
  $lease_account \
  $years \
  $config_account \
  $payer_token_account \
  [OPTIONS]
lease_account
string
required
Expired lease account address to reclaim
years
u8
required
Years to apply to the new lease as an unsigned 8-bit integer (valid range: 1-255)
config_account
string
required
Registry config account address
payer_token_account
string
required
Registry mint token account owned by the fee payer
--fee-payer
string
default:"default"
Signer for the transaction
--thru-registrar-program
string
Override the thru registrar program address