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 and price configuration. The CLI derives the config account (seed config) and validates the token mint/treasurer accounts against the provided token program.
thru-cli registrar initialize-registry \
  <root_registrar_account> \
  <treasurer_account> \
  <token_mint_account> \
  <price_per_year> \
  [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 and match the token program
token_mint_account
string
required
Registry payment token mint address
price_per_year
integer
required
Price in base units per year of registration (applied to purchases and renewals)
--root-domain-name
string
default:"thru"
Root name stored in the registry config (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 \
  taAAA...rootRegistrar \
  taBBB...treasurerTokenAcct \
  taCCC...registryMint \
  10_000_000 \
  --token-program taTPROG...

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
integer
required
Lease term in years (must be > 0)
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 \
  taCONFIG... \
  taPAYER_TOKEN...
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
integer
required
Additional years to add (must be > 0)
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 \
  taLEASE... \
  1 \
  taCONFIG... \
  taPAYER_TOKEN...

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
integer
required
Years to apply to the new lease
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